« first day (2086 days earlier)      last day (2867 days later) » 

 
1 hour later…
1:29 AM
@HatterisMad *her
 
1:41 AM
hey buddy
 
 
2 hours later…
4:54 AM
Guys
What does this command do?
. ~/.bashrc
 
@littlepootis it is run on start. You would rerun in case you changed the file.
 
Figured, thanks.
 
It sources the startup file in the current shell, so you don't have to log out/exit and back in for changes in the file to take effect...
 
m59
5:15 AM
I have a chain of streams using through2. I made them totally arbitrary for debugging...they each just push foo or bar, etc. If I pipe in from stdin, the chunks are transformed to bar or whatever is last. If I do stream.write, though, the resulting value is whatever is written. It skips the transforms entirely.
the through streams don't get any chunks
hah
It's the chaining
You write to the last stream in the chain.
// wrong
var x = through(function (chunk, enc, cb) {
  this.push('new')
  cb()
}).pipe(process.stdout)
x.write('original') // <-- to stdout
// correct
var x = through(function (chunk, enc, cb) {
  this.push('new')
  cb()
})

x.pipe(process.stdout)
x.write('original')
 
I have a hopefully simple question. How do you guys automatically deploy your applications when the frontend needs to call an API in the backend. For example, $.get('http://localhost:8000') works in development but replacing that url is needed in production?
 
m59
Plenty of ways to do it. I have been checking the location object. Not sure what the best way is. @RobertSmith
 
5:30 AM
I'm currently using ansible with its lineinfile module to replace localhost and instead use a public IP, so most of the process is running automatically, but it doesn't look like a very robust way to do it.
Mainly because I need to be careful about changing my source code in some lines that are needed by the lineinfile module. Do you have suggestions?
 
m59
I wouldn't do that...
if (location.hostname === 'localhost') {
  // do development stuff
} else {
  // do production stuff
}
easy!
 
Oh! ... let me see if that works
 
m59
@RobertSmith There's also this approach github.com/hughsk/envify
 
is there any place where i can design a web application for free.i want to build some websites to add to my resume.
 
5:35 AM
fetch('/path/toresource/') relative urls ..
 
I like your approach, but now I see that I need to include the public IP dynamically. I'm currently using EC2 instances, so I need to set the address of that instance.
 
configure it to use elastic ip.. get a domain.. ?
 
Yes, I know. I'm still testing the application, so I don't want to use a domain yet. Using an elastic IP is a possibility. The thing I don't really like is that now the code becomes dependent on that address.
 
5:55 AM
make some functions like getStuff( (u)=> get(url_join(ip,u,port))); then you would only have to set it one place....
 
But I don't know the IP beforehand, that's why I'm currently setting that value when deploying with Ansible.
 
@BadgerCat Wow, actually have a list, huh?
 
7:47 AM
morning
 
 
2 hours later…
10:15 AM
so what are the devtools to install on Mac
I have so far VSCode, Atom
zsh
parallels (work specific)
Xcode is installing
anything I am missing?
 
10:40 AM
help
0
Q: Console script to constantly click button

bob jomesSay I visit a webpage which has the following line of code: <a class="btn">Example</a> I need a Javascript code which I could run in the Google Chrome console to constantly click that element until it's not present on the page anymore.

 
10:50 AM
1 message moved to Trash can
@lovetolearn Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
thanks i am new
 
is it correct now?
 
@lovetolearn Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
class TaskCollection {
	constructor(task =[]) {
		//this.tasks = tasks;

	}
}
 
11:03 AM
hello :)
I am having trouble with language. Peter [lives in building A], [works at building B], [is a manager of building C]. These are peters x. Resolve x.
 
11:58 AM
What's wrong with this? jsfiddle.net/Lz6hcpft
 
@HatterisMad why?
I'm going to learn Ruby again
I plan to just do regular problems with it - any other ideas?
 
A testing framework.
 
meh
My plan is
- Go through learn x in y minutes
- Go through some basic exercises: 99 lisp questions, some project euler stuff
- Build a scraper for something, work with db
- Attempt some UI, but not a lot
 
12:24 PM
gmo free?
 
Indeed. We want original JS only. None of this modified new JS.
 
@Luggage define modified new JS
 
I was joking.
 
@Luggage I thought you meant ES7 or something
Yo luggage, mind having a look at my question which I posted two days ago?
0
Q: Better way of adding values to varying dynamic properties?

AspergerMinimalistic way of adding values to dynamic properties? Lately I find myself in situations where I need to change the inline styles of my divs dynamically. function dynamicCSS(prop, val) { el.style[prop] = val; } If my property is a transform rotate then I would have to format things like ...

 
I think the value should come in pre-formatted, not just an integer that you make assumptions on.
 
12:28 PM
Im writing a little script where I need to do a lot of mapping
 
otherwise, how can people specify non-standard units?
 
@Luggage it does come pre-formatted
 
then I don't understand the problem.
 
if I say x.style.fontSize I get the value and the "px"
just as an example. I have to parse it thought since I cant change it otherwise
then apply it again and format the value manually.
 
you code only show you replacing it, not doing math on it: el.style[prop] = val;
 
12:31 PM
so its -> Get value -> parse value -> change value -> re-format value -> apply
@Luggage damn, you are right
I think I better post a new question right?
 
Also, doing matho on the existing values would be very problematic. I think you should ONLY set whole new values like you are.
I don't think you have a problem yet, let alone a question.
From a slightly higher perspective, what are you trying to accomplish?
 
Ok ill explain in detail and write some code.
 
You want a framework like,.. elem.setBackgroundColor( r, g, b) where you can set individual css props ?
 
give me 3 min
 
Right away, I hate it. You have CSS as state.
 
12:36 PM
imagine I have to do this for many properties. Id end up with a lot of code
Hashmaps would make it worst. Switch statements are out of question too.
 
So.. back to my first statement.
 
Which was?
 
Pass in values with the format already. Pass in '10deg', not 10
What if I wanted to use radians? Your code wouldn't let me.
10 mins ago, by Luggage
I think the value should come in pre-formatted, not just an integer that you make assumptions on.
 
but then we still have in the case of rotate this part of the string: property + '(' + value + ')'
The brackets and name of the transform for example
 
no.
that's still part of the value
what is the css property for that? transform?
 
12:39 PM
yes
 
transform: 'rotate(30deg)' ot whatever.
 
by the way, need to adjust code
 
Do you inderstand how limiting taking a single number and trying to guess the rest is?
 
Even in the experimental Web Animation API, you have to pass full qualified css props..
 
Darn it
I found it cooler if my interface was simple as: example({rotate: 10})
as to abstract the user away from the rest
 
12:42 PM
You want jQuery.animate ?
 
it's such a thin abstraction that doesn't give any real advantages in that form
 
Of course you are right
 
Glad I could shoot down your ideas. :)
 
Thanks. Man that took long xD
 
now.. if you want to represent style as a JS object like that, that's fine and possibly useful
React does it.
 
12:43 PM
Sometimes its hard to change the path you are heading
 
You give react values like: { backgroundColor: 'blue; } and it makes style="background-color: blue;"
 
ya thats what my script does too
I just wanted to abstract away all those strings but that was a bad idea
I end up with redundant if else checks that only provide a very thin abstraction layer
 
so that part is fine. But but don't go turning { rotate: 10 } into "transform: rotate(10deg)", which makes a lot of assumptions
 
what kind of assumptions?
 
um.. everyhthing.
the units, other css operators and math they might want to use
 
12:50 PM
1998: - Don't get in strangers' cars - Don't meet ppl from internet 2016: - Literally summon strangers from internet to get in their car
 
@Luggage you mean the entire value as "transform: rotate(10deg)"?
that wouldnt be the case
as I would only add in "rotate(10deg)"
 
Hi guys.
 
neverless I would have to pass in the following input parameter: example(rotate: "rotate(10deg)")
 
I wanted to ask: Is it recommended to use TypeScript over plain ES6? I know it transpiles. But I just wanted to know.
 
"10deg" alone wont work
 
12:52 PM
@HassanAlthaf depends on what your goal is, ofc
I personally never felt the need to use typescript
 
@towc Writing an SPA for example (with Angular or something)
 
Ditch TypeScript
 
^
 
if you want this to work: el.style[key] then you are turning { rotate: 10 } into "transform: rotate(10deg)". Since the is no rotate rule for css
 
12:53 PM
@HassanAlthaf have we met before?
 
Is ES6 well supported yet?
@towc Maybe. This room.
 
go for ES5 :P
 
ew es5 gets messy lol
If you ever looked at Angular2 apps with es5
 
1. Don't abstract CSS, 2. Do abstract css, which will be a lot more work than you think.
 
@HassanAlthaf and wow, many people managed before you :)
 
12:55 PM
There is no reason NOT to use ES6
 
@Luggage Yup.
 
support is still only partial
 
who cares. Babel
 
Which is why I haven't made the switch to ES6 yet.
 
I'm not waiting for every grandmother to update their browser.
 
12:56 PM
I read somewhere that TypeScript features are going to come over to ES7?
 
@Luggage true, but requires setup that I'm not willing to make the effort towards :P
 
@Luggage +1. Neither do I have to wait. I'm still a student. I have a few more years to get into industry.
 
babel with es6 preset and babel-runtime for polyfills mean you can run on at least as old as IE9
 
@Luggage even canary doesn't fully support ES6 afaik
but it's enough for basic ES6 things, yeah
 
OK. I still don't care for the same reasons.
 
12:57 PM
Is IE even used still? Microsoft forced to Windows 10 and Win10 doesnt have IE.
 
I have babel.
 
I use Stage 0.. I can't even use native for that in latest browsers :(
 
well, then that's dumb :)
 
@HassanAlthaf you wish XD
 
@towc Every web devs dream. Ditch IE
 
12:58 PM
edge is fine, i think
 
@towc Microsoft should really force everyone to stop using IE.
 
@HassanAlthaf you have that, I'll take money and bitches
 
Yeah, edge is pretty good.
I really like Edge, but I feel its more like a tablet browser.
 
@HassanAlthaf but they can't really afaik. IE is used too widely in too many outdated companies which legally require IE8 and similar
but yeah, if they could they should XD
 
Stupid companies lol.
They should make the move.
I mean, IE is so old.
 
12:59 PM
MS could have made IE 11 forl other OSes
 
@HassanAlthaf every browser should feel like both a tablet browser and a non-tablet browser. Edge sucks quite heavily
 
@towc Yes. It doesnt feel like a desktop app
 
the thing I hate most about edge is how microsoft boasts about it and displays skewed test results
 
IE only needs network access and to be able to draw web pages in a square. There is no erason you need an OS update to be a browser update
 
Would definitely use if it didnt look like that
I'm off.
Time to break fast.
 
1:00 PM
cya
 
-_-
unrelated interesting news:
 
@Luggage I don't care enough about ES6 to use babel
 
Gasp.
 
we're finding too much common ground @littlepootis. Let's have a fight
can't think of anything that I truly believe in that you may not disagree about...
TF2 sucks
:D
 
1:04 PM
@towc It really does.
 
shoot :/
back-end is harder than front-end on most levels
 
After 9 years in development and 9 years of updates, it barely hits 110 fps on GTX 1080 at 1080p.
 
someone help please
0
Q: Console script to constantly click button

bob jomesSay I visit a webpage which has the following line of code: <a class="btn">Example</a> I need a Javascript code which I could run in the Google Chrome console to constantly click that element until it's not present on the page anymore.

 
@bobjomes Unless you tell me what website it is, I'm not going to help you.
 
roblox.com
 
1:07 PM
And what button is it?
 
It's on the page roblox.com/my/money.aspx#/#TradeItems_tab but you need membership to access the page
 
Also, Overwatch gave me epileptic herpes.
 
dat a thing?
 
@bobjomes um
 
it's like a pagination system
 
1:10 PM
Well, it disappears after you click it once..
That's expected behavior.
 
it doesn't
as there's about 50 pages
it then reapears and you have to click it again
 
Great. Click it after certain interval.
 
so like this suggested?
var btn = document.querySelector(".btn"); window.setInterval(function() { btn.click(); }, 30); /// time in milliseconds
 
oh
 
1:11 PM
window.setInterval(function() { document.querySelector(".btn").click(); }, 1000);
Or whatever interval you like.
If it doesn't work, try increasing the interval.
 
brilliant
thank you
 
@littlepootis you know how to things. If I wanted to run a script that isn't in a file in a single line of the terminal using nodejs, how could I go about doing that? Without having to make a temporary file for it...
Thinking in the lines of `js -r 'Math.sin(1) + 50'`
obv I can do echo "Math.sin(1) + 50" > ~/temp.js; js temp.js or something similar, but urgh...
 
node -e "console.log('pootis')"
 
tries to intepret console.log('pootis') as a file name
 
You forgot the -e
 
1:22 PM
hehe nvm
no, issue was that I used ' instead of "
I had tried with -e...
 
thanks anyway
 
Also, there's -p that lets you do exactly what you want.
 
yeah
what do you think I want anyway :P
you know nothing, pootis snow
 
> js -r 'Math.sin(1) + 50'
 
1:24 PM
ok, fair enough...
useless without output...
so here's my new favorite thing in vim: :r !js -pe "stuff"
I can imap it I guess
 
what was the game? :P
 
Instead of fixing their shit, they permabanned this person's account. wtf
@towc Overwatch
 
oh, right
well, they don't want to incentivize exploitation, which is fair enough
they could however set up testing servers and let everyone who wants to fuck around do it there and then collect all the data XD
 
There are YouTube channels dedicated to posting videos about TF2 exploits and greifing.
@towc Says a lot about Blizzard.
@towc No community servers.
So, no mods. You can't script the game either.
 
1:28 PM
it's not a bad thing
 
@towc That is a bad thing. Community servers with custom mods and gamemodes are much more fun than the actual games.
 
oh no, that is a bad thing
but not the first thing
> Says a lot about Blizzard
 
TF2 has custom game modes like Zombie Fortress, Slender Fortress, Prop Hunt, etc.
 
agreed
 
But that's not where the money is , money is getting people to buy hats. :|
 
1:37 PM
true
 
Or selling people tickets to see virtual tournaments..
 
I'm pretty sure there are Dota 2 and LoL fans that would do that..
or WoW
 
They host it in real with sponsors and all that ... crazy
 

« first day (2086 days earlier)      last day (2867 days later) »