« first day (1688 days earlier)      last day (3266 days later) » 

7:00 PM
cba fixing it atm
 
@IPAddress how much are you getting paid to fix this?
 
but if anyone could help or give me an idea why the iframe is messed up
nothing
 
@IPAddress But we can?
 
£0
 
@IPAddress lol.
shisha places are silly, do you know how much smoking a shisha or buying one costs here :D?
 
7:01 PM
yeah £8 per one
 
Get ip address without using net ?
 
@IPAddress wait, that's what it costs there? That's not too bad. It's about 3 times what you pay here but here it's authentic.
 
And I mean the net package
 
how about
 
@Catgocat is that a question?
 
7:01 PM
if you help me out, ill give you free shisha
real talk
 
@BenjaminGruenbaum No it's not, I just put a question mark because it's cute
 
@Catgocat oh, cool then.
 
@BenjaminGruenbaum I was jokiiiiiing
 
@Catgocat posting a question as a joke isn't very funny.
 
It was a serious question though
How would you get the ip address without using net package to make a connection?
 
7:03 PM
This is serious business.
@Catgocat the ip address of whom?
 
Yeah - lol
 
Of the current user.
That is using the app.
 
@Catgocat let me guess, you have an express server?
 
@BenjaminGruenbaum No, I am building a CLI and I want to display the ip address because it looks cool.
 
@Catgocat that's pretty retarded. You want to get the ip of your own computer?
It's 127.0.0.1
 
7:05 PM
No, I want to get the ipAddress to make a log file and send it to my MYSQL server to a database.
 
When you're sending it, you're also sending tour IP address, how do you think the internet knows how to route it correctly?
You're already sending the ip address with every request. You should really learn how networking works.
 
Just tell me Benjamin stop bullying
 
I announced bounty on one of my questions.
0
Q: Modifying viewer.js file

Mr_GreenAccording to Mozilla's pdfjs plugin, I can view my pdfs by passing a query param to viewer.html as shown below: http://localhost/MyProject/viewer.html/?file=file.pdf This is working fine. But I have some different kind of requirement. The requirement in my project is that I need to have tabs l...

 
@Catgocat I'm not bullying anyone, bullying would have been to kick you or trash your messages or telling you to better research your question as per room policy. I was helping you with your problem - a "thanks" would have been nice.
 
Thank you (:
 
7:08 PM
Sure thing.
 
should I do any changes to that question?
 
@Mr_Green to be fair - its' a pretty bad question for SO, it's too specific but not isolated and there is very little chance someone will be able to help you. I'm not close or down voting because we're pals but honestly - normally I would.
 
Thanks for being fair and thinking me as pal :)
yeah sometimes I do ask bad questions because honestly, I need answer
 
Hello
 
@rublex Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
7:17 PM
@rublex you're the guy from the deployment question right?
 
@BenjaminGruenbaum Yes!
 
Let's go through them one by one:
> Any danger in having my app files live inside my non-sudo user home? If so, where should my app files live?
Assuming you don't have any silly vulnerabilities than yes - it's perfectly safe. Servers guard against this and you can't access the parent of a static root.
> I'm wondering if public/ should be in a different place and not live in the same folder as the application files. I wouldn't want the application source files to leak out, especially my config.js which holds some sensitive information like my database auth details and email auth details.
Chances are that anything that will bypass that protection will get shell access anyway. Make sure your database account is limited and your email auth address allow resetting in case it's compromised. Also make sure you have backups, that you use hashes and security best practices on DB passwords and so on. I'm assuming public/ is the root of the static server - it's guarded against but multilayering is good.
> Right now permissions on app/ are chown -R appuser:appuser app/, so that user owns all the files. Are there other permissions I should set on my application folder?
This sounds entirely reasonable.
> How should I get pm2 to restart my app safely using my non-sudo user?
There was a --run-as-user option but it was removed, there's a -u switch. There's also a pending PR to support this better.
> My app handles routes and should throw 404 if a route is not found. But is it possible for someone to work around that and maliciously make my app or nginx browse other directories?
Not unless you explicitly allow that in nginx
 
Oh okay, so to ensure that my app gets restarted after a server reboot, I should start my app with:

`pm2 start app.js -u appuser`

Is that right?
 
Where are you hosting your app?
Also yes
 
I bought the $10 linode vps
 
7:31 PM
Everything else that applies to server applies here too by the way (like updates), putting your site on a single server without redundancy is risky - but if it's not too big it'll work at least for a start.
 
Yes, you are right. I think for a simple blog that no one cares about is fine with a single instance. I just wanted to understand some best practices.
 
Sure thing, glad I could help
 
@rublex That's a healthy attitude
 
Should I delete my question on SO or is there a way to link this chat to it?
@BenjaminGruenbaum Should pm2-init.sh be inside /etc/init.d? It's not there since I installed locally. Or is that not necessary if -u takes care of that for me?
 
> fs.writeSync ('./hello.txt', 'hi')
TypeError: First argument must be file descriptor
    at TypeError (native)
    at Object.fs.writeSync (fs.js:668:18)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:155:27)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:309:12)
    at emitOne (events.js:77:13)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:208:10)
>
 
7:43 PM
RTFM
 
@Catgocat you want writeFileSync
 
@FlorianMargaine You're the man :))
 
Hello room. I built a very simple JS based webapp hosted on firebase. I want to use a 3rd party api from amzon, but it requires server side code. Firebase doesn't allow this.. what will I need to do?
What will be my easiest solution to allow for api requests?
Thanks in advance for any assistance I can get. I've spent hours this morning trying to research, and I'm not having much luck
 
33
A: HTML5 canvas drawImage with at an angle

Jakub WieczorekYou need to modify the transformation matrix before drawing the image that you want rotated. Assume image points to an HTMLImageElement object. var x = canvas.width / 2; var y = canvas.height / 2; var width = image.width; var height = image.height; context.translate(x, y); context.rotate(angle...

Is that the way to draw a rotated image on canvas?? Seems bit overcomplicated
 
I remember you can rotate the x-axis and y-axis.
And then insert the image and then rotate that back.
 
8:00 PM
k, I'll be broadcasting a lecture/talk/whatever this Saturday, ping me if you want to attend. Details here: gist.github.com/rlemon/d8630a365e665083d260#comment-1464171
9
 
@JackHarding use a server.
 
@Zirak I can watch
 
@JackHarding Seriously, if it requires server-side code you need a server, servers can talk to firebase just fine.
 
ok. This is admittedly a question that will show my lack of knowledge/experience... but I assume I can use a baas as a server solution right?
 
@JackHarding baas?
 
8:03 PM
backend as a service
 
Sure, I think you can. Not sure why you would but you can.
 
well when you say use a server... do you just mean like.. get a hosting account somewhere?
 
You can call your server whatever you want.
@JackHarding yes, it's pretty affordable and pretty simple. If your experience is with JavaScript you can use node and share code between them, it also tends to be good with apis like firebase.
If you insist on baas then Azure has a plan for mobile backend as a service using it (or C# if you prefer), also any other form of hosting would work - how do you currently serve your files anyway?
 
@Zirak I'll be there
 
firebase hosting
I have like 1 html.index file, a css stylesheet and a JS file
I use firebase to house all the data
 
8:06 PM
Ok, get real hosting then
 
@Catgocat, @copy Neat, any preferred topic of the two?
 
Flash cheating
 
Sounds good.
 
Awesome, was hoping to do that
 
Thanks Benjamin!
 
8:10 PM
Sure thing
 
@Zirak You're going to paste the hangout link here right?
 
But of course
 
Holy F android and Pure JAVA are PITA :-/
 
@Zirak flash cheating using Charles?
 
Hey @BenjaminGruenbaum, what hosting provider would you recommend?
 
8:23 PM
or, err, what was the windows-only proprietary app...
 
@FlorianMargaine Charles? The web proxy?
 
@FlorianMargaine SoThink Decompiler?
 
I've used godaddy and arvixe in the past, but only for very simply sites, never web applications
 
I used Sothink Decompiler to hack www.transformice.com
 
8:23 PM
Charles isn't Flash specific, nor is it in any way cool
 
I made my own server of that game..
 
@Zirak are you going to present apps that work on linux?
 
Now they have some unbreakable SWF :(
 
Nope
 
@Zirak yeah, seeing that, dunno why I kept this impression
 
8:25 PM
@Catgocat No such thing, at best they're smarter and move most logic to server like any decent thing.
 
Yeah maybe
 
I remember the old store two/three times in different bases trick.
can't remember which game did it, but it pissed me off to no end.
 
Should I prepend every message sent to CLI with the user information or just on input ?
First world problems
 
8:42 PM
o/
 
o/ @RaghavSood
@JackHarding lots of options, there's heroku, there's Azure and so on
 
So, I've rewritten my DOM space shooter to canvas and pressed F5
drumroll...
...It still needs work
 
troll level: dad
"dad, for my birthday I want cold hard cash"
 
8:57 PM
@rlemon That's not funny, kids in Africa could have eaten that cash.
 
no
money gives you indigestion
 
Ok sir, I didn't know YOU were a doctor
 
you don't have to be a doctor to use common sense
 
@rlemon reminds me of @Loktar
he reached a pretty high troll level with the gameboy gift
 
@rlemon money is made of cotton primarily
Although I don't know what the ink is made of, so that might be toxic.
 
9:02 PM
here money is made of paper
 
here money is plastic. but regardless, eating a pile of cotton/chemicals/grime is going to end up with your stomach feeling ill
 
or worse
 
9:16 PM
@Jonathan I don't see what you mean.
What's wrong with a ship the size of several galaxies?
 
Oh, it got worse...
I have giant spaceships spinning out of control now, unable to move
Uncaught InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.
nice..
 
can someone tell me the best gore ultra hack slash game for pc is ?
van helsing 2 or ninja gaiden
 
Guys, you need to watch this btw....
Best... Movie... Ever...
 
9:31 PM
was covered in this forum about 3 days ago !
 
@havingagoatit This isn't a forum..
> Walking on water and developing software from a specification are easy if both are frozen.
-- Edward V Berard
7
Heh
 
can something like a stateless, functional UI even exist?
 
@Mosho I think react aims at that
Although, I think DOM is stateful by definition
 
so you have a "database" and UI
which are stateful, and the rest is functional
 
@Mosho I don't see why not
 
9:40 PM
I guess you can say the data model and UI aren't part of the program
 
Anyone has a clue why my spaceships are gigantic? Their width and height is set to 80 when I call drawImage, but they are massive
 
9:59 PM
A, needed to explicitly set width and height
it has defaults of 300/150
and for some reason that makes everything 5 times bigger....
which makes very little sense to me
 
10:51 PM
@MadaraUchiha your still too late ! hah
 
MLM
11:48 PM
Do you think this is too clever? jsfiddle.net/MadLittleMods/Lp12Lgxy - I want the function to be initially called and available for later
 

« first day (1688 days earlier)      last day (3266 days later) »