« first day (1257 days earlier)      last day (3707 days later) » 

Ale
6:01 PM
@JFit !! converts anything to boolean, try !!0, !!1, !!"fdsfgs"
!!> [!!0, !!2, !!"", !!"rainbows"]
 
@Ale [false,true,false,true]
 
@Ale Wow nice, thanks.. Couldn't find it on google lol
 
It can search symbols and other special signs
 
What did he do?
 
Ale
6:06 PM
His nickname
 
lmao
@ComFreek Thanks buddy :)
 
Ale
SymbolHound is neat, yeah
 
@SomeKittensUx2666 I'd call it mocking
 
@false9striker 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.
 
they'll send bears to ear you @false9striker
 
6:10 PM
?
 
Welcome to the JS chat
 
<3
 
Ale
We also have another one
!!unwelcome false9striker
 
You seem to have ended up in the JavaScript chat! Please kindly GTFO. Please don't ask if you can ask or if anyone's around; just don't ask your question. You have now been labeled a habitual oxygen thief and we would appreciate it if you stopped.
 
6:11 PM
ugh. ever feel like "you" are the only reason you are not getting this
??
 
!!forget unwelcome
 
@SomeKittensUx2666 Command unwelcome forgotten.
 
!!/listcommands
 
@ComFreek 420, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, awsm, ban, unban, color, convert, define, doge, domain, findcommand, github, google, hang, inhistory, jquery, learn, aliens, format, fa, easytools, wherearethegoats, tobacconist, joystick, fools, cake, cool, vengeance, ln, protip, slidepoop, zirak_naked, loktar, artisticpoop, crustypoop, buttstuff, poopkittie, daybreak, rfc, man, ಠ_ಠ..., getit, resources, html5unleashed, jspattern, ajax, xhr
guesswhat, amazon, ihazbukkit, bewbz, solution, sandbox, friday, gayclubs, kumar, echo, pizza, wherearemypa
 
Promises shouldn't be this hard right?
 
6:12 PM
angularjs or emberjs which one is better?
 
neither
 
Do you use a framework at all? @rlemon
 
neither.
 
Ale
only plain js, only hardcore
 
6:13 PM
if you count expressjs
 
@false9striker Apples or oranges, which is better? You're asking the wrong question
 
Oranges, easy.
Unless we're talking about pie, then Apple.
 
@Loktar nah, Apples. less work.
@SomeKittensUx2666 you use a lot of node and express yes?
 
@rlemon I hate how apples make my teeth feel
 
@rlemon yep, got a question?
 
6:14 PM
more like I need someone to hold my hand for a bit
trying to get some sane login stuff working
can't seem to get my head around doing it with Promises, and callback hell otherwise.
 
Ale
Oranges.
 
hand-rolled? That's asking for trouble
 
hell man, I'll take anything I can get working in the next 2 hours
I have node (latest) and postgres on the server
 
I'm assuming a standard username/password login?
 
yup
 
6:16 PM
If you just want to get it running, I'd recommend passport
 
I need a simple quick login :P I've written like 100 of these in PHP, when I get to node I am like "hurr durr I don't know what the fuck to do"
 
posted on March 26, 2014 by Nicholas C. Zakas

For almost two years, I’ve been keeping notes on the side about ECMAScript 6 features. Some of those notes have made it into blog posts while others have languished on my hard drive waiting to be used for something. My intent was to compile all of these notes into a book at some point in […]

2
 
@SomeKittensUx2666 I looked at the passport local examples for mongo
but no one has anything for postgres
(that I found)
 
@rlemon dude
let me know when you find one
I get hung up on that and I say eh fuck it and give up
 
6:17 PM
yea but I can't
I need this working last week
 
You don't need a postgres module for passport
 
(fresh start, close all tabs to the right)
 
Lemme sanitize what we use
and send a gist
 
sweet.
passportjs.org/guide/username-password because I look at this and think.. well fuck it can't be that easy. where is the DB?
where is shit stored?
is everything abstracted behind the scenes? does passport use its own DB or flat file or something? wth is going on in these examples?!
 
Hahaha noone knows where the usernames & passwords are stored
Interesting piece of software
 
6:21 PM
and like what is User? where is that defined?
 
user1596138
In your wife's pants
 
god I hate examples that assume I know what the fuck i'm doing.
I wouldn't be looking at the example if I did
 
has anyone else noticed a little stray "x" on google's results page?
 
@rlemon I think you have to define User yourself
So you have to write a callback function which checks for a correct match of username & pw
 
@ComFreek clearly. but it isn't a very useful example if they leave it all ambiguous
 
6:23 PM
Yep, I totally agree.
 
@ComFreek if that is the case why use an authentication library in the first place. I would just be doing it all by hand.,
 
@Bubbas Where is the 'x'?
 
div id="spchx"
 
@rlemon "Abstraction"... some things get abstracted so much that you don't know what they are actually doing afterwards
@Bubbas I can't find #spchx
 
whats best way to get an image into this chat
 
6:24 PM
Where are you from?
 
i took a screenshot
 
Upload it to imgur or the like
post a link
 
@ComFreek open your console and type the id
it will return the element
 
did you find the x @rlemon ?
 
just type spchx in the console., then hover over the returned element and you'll see it on the DOM
top right corner of the page
 
@rlemon I am not dumb... I did it in IE and Chrome
 
i see it in the left top
 
no results
 
semi-pseudocode, let me know if you need more info
 
theres my screenshot
 
6:26 PM
@ComFreek never said you were.
 
@SomeKittensUx2666 I starred it as well, I could use that for sure thanks
 
Never said you said^^ @rlemon
 
so why even mention it?
"I'm not dumb" in response to a suggestion is standoffish
 
@rlemon I am sorry, that wasn't meant to be standoffish.
 
var pg = require('pg').native;

var pgsql = new pg.Client(connString); // should work Kittens?
 
6:28 PM
whose wacky whale? lol
 
@rlemon /me does not know postgres
I've used it once, with RoR, and that doesn't count.
 
okay, will try.
my wtf/min today are increasing steadily.
 
@LucasPenney 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.
 
@Bubbas I tried Tor, some American proxies and some other proxies: I never saw #spchx
 
interesting
 
6:33 PM
@SomeKittensUx2666 Maybe I misspoke, I was trying to imply quite the opposite.
 
did u see my screen shot?
i swear its there xD
 
Yes
 
lol
who knows then
 
Maybe you inserted it via the developer console :P
 
haha
i didnt...intentionally at least
 
6:34 PM
@SomeKittensUx2666 my point is that you could be effective without knowing the detailed specifics of everything. Just like you can use .attr("id") and build awesome things since it's a lot less significant than the concept. I apologize if it came out wrong.
 
or one of your browser extensions inserted it
 
@SomeKittensUx2666 do you really notify the user that it is their username vs password that is wrong?
 
@rlemon You can, if you want to
 
isn't that a huge security hole?
 
^
That's why I avoid telling them which one is wrong
 
6:36 PM
same
I don't know if he does. the code he gave me alludes to the fact that he does.
(haven't read routes.js yet)
could be a logging thing.
 
In that app, we decided that better UX was worth it
 
@SomeKittensUx2666 okay, so the code inside of passport.js makes sense to me
how do you call into it?
how is it used?
 
Is anyone here a member of the ACM?
 
Have you tried it @RyanKinal ? Does it work?
 
6:40 PM
@ComFreek I've started. I'm liking it so far.
A friend of mine is much further in, and he loves it.
 
DuoLingo's awesome
I didn't go through with it, but still loved the app
 
Yeah, it's really slick
 
Good to know!
 
gist.github.com/rlemon/9790295 anyone who uses passport ( cc @SomeKittensUx2666 )
 
There's also Babble
I've heard that's good too
 
6:42 PM
Oh no Babbel! I once registered there and now I get many, many spam mails.
 
Haha, yeah, I had that too
 
@ComFreek I mean, with the name I feel like you shouldn't be surprised...
 
I started using Babble. It's okay.
 
Why the heck do I need a username for a learning platform ?!
An email should be sufficient
 
6:44 PM
Why do you need a username for anything, in that case?
 
So your friends can add you
 
For identification purpose or on social platforms (incl. SO)
 
@rlemon Are you asking what module.exports is?
 
@SomeKittensUx2666 nope. what the fuck do I export from that passport code ;)
but i'm looking at the app.js example now
 
nothing
maaaaaaaagic
 
6:51 PM
whats the topnotch highscore for cavecrawler ?
 
so i'm still lost here dude
you are passing around messages
but you are returning shit that goes where?
 
@rlemon it's modifying passport (which is cached after the first require)
So we don't need to return anything
 
and how do you pass in the username and password?
function(providedUsername, password, done) {
where is providedUsername and password taken from?
 
I'm sorry if my questions are extra nooby. I'm so fucking lost right now man :P
node seems to have a whole fucking load of automagic
 
6:54 PM
updated
forgot the route to actually log in
 
@C5H8NNaO4 no sorry, there is nothing popping up in my mind. Is it about hyphenation or something ?
 
@SomeKittensUx2666 ahh, so post data contains 'providedUsername' and 'password' values?
ugh. I am going for a smoke.
 
!!s/./SMOKING KILLS/g
 
@jAndy SMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLSSMOKING KILLS (source)
 
'kill smoking', ok
 
6:59 PM
@jAndy thanks tips
 
free pro tipps today
 
@SomeKittensUx2666 I'm still confused how providedUsername and password are actually passed?
I will give anyone $10 right now to write me a thin skeleton for what I need ;)
(//cc @SomeGuy)
 
@SomeKittensUx2666 why would you confuse the lemon ?
 
@jAndy I need tips :(
actually just a kick in the ass
had fast food last night, and today for lunch
 
aawwrrrrr
 
7:02 PM
I just can't get my motivation up to get in shape lately..
 
@dnelson 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.
 
!!s/./FAST FOOD KILLS-/g
 
my issue is that I drink too much beer. :/
 
Server error (status 500) occured (message probably too long)
 
I eat well. beer is my vice.
 
7:03 PM
ups :P
beer, cigarettes, fast food... duuuudes
 
ohh and no cardio since ~december has put ~15 lb on me
 
I said it once it would be nice to have some oversee coder bros in 20 years too
stop doing what you're doing :p
 
no you stop telling us we are bad people for enjoying life ;)
 
Ive at least done cardio
ran 6 miles 2 nights ago
 
be inspiration, not a self righteous douche.
 
7:05 PM
but Im still a fat ass.
 
stahp bitching
 
@Loktar my back man. I'm not supposed to :(
I'm going to say fuck it soon and get back into it
 
ah I forgot, that sucks man
 
not even supposed to do a pushup
 
@rlemon Hahaha
 
7:06 PM
okay, now back into not understanding my code! yay!
cough @SomeKittensUx2666 ;)
 
@rlemon Wow, that sucks
What kinds of exercise are you allowed then?
 
the 6 they have given me.
 
Probably swimming
 
@rlemon I'll trade you: write me a working FB login system in PHP
 
mostly just back stretches
@SomeKittensUx2666 umm, sure? no but really. if you could just answer "how are the username and password passed to the anon function in the localStrategy" that would be bauce
 
7:08 PM
dogebauce
 
app.post('/login',
  passport.authenticate('local', {failureRedirect: '/login?failed=true'}),
  function(req, res) {
    res.redirect('/');
  }
);
tells me that you are using passport yes, and done is the anon function I see there
but how does it get the first two arguments?
by "it" I mean:
function(providedUsername, password, done) {
 
> By default, LocalStrategy expects to find credentials in parameters named username and password.
 
ahh, that makes sense.
thankyou
also, automagic sucks when you are not expecting it
 
^^^ Ruby on Rails
 
Ale
In Rails you expect everything.
 
7:16 PM
 
7:32 PM
@SomeKittensUx2666 last question. I figure you will be faster than the docs ;)
how do I know i'm logged in once i've actually logged in?
 
req.user is defined
c'mon that one's easy.
 
:(
:holds out hand so Kittens can slap it:
 
does JS have native EXIF support for images?
 
!!google does JS have native EXIF support for images?
 
7:41 PM
@spencore ^
 
Nick Zakas is writing another book, yay!
 
@SomeKittensUx2666 sorry those resources didnt help
i have been googling for awhile now
 
@SomeKittensUx2666 gist.github.com/rlemon/a2fa12bfd550ef5a0e7b look plox
look good?
(for a very basic example)
 
you need the passport middleware
if you want session support
 
@rlemon nice secret :)
 
7:48 PM
clearly that is changed for the gist ;)
not like @RUJordan who emailed me his server cred
 
I'd never have guessed!
 
I asked to see some of his code, and told him to redact any private data. he just send me it with server configs and all
 
Hahaha @RUJordan typical.
 
I think we should ping @RUJordan more
 
user1596138
@RUJordan wtf man
 
7:51 PM
@RUJordan just trusts Canadians too much
Am I right, @RUJordan?
 
@SomeKittensUx2666 updated, can you check again please?
 
@SomeKittensUx2666 ^
 
@SomeGuy he didn't see me tell him to redact it - and thought "well hell I trust lemon"
 
Haha
 
There's a guy in #startups named SomeGuy123 and we keep getting crosspinged
 
7:52 PM
@RUJordan has is a MASSIVE DICK
oops
 
what?
in his hand maybe.
but that picture is hush hush here so I don't get banned
 
Hahahahaha
 
@rlemon still fail
A.) You need to require passport in app.js
B.) calls to `authenticate` should be off of the required value in step A
 
var auth = require('modules/authentication');
 
> "VR will change the world!",
"VR is for everyone!",
"VR is the future of communication!",
"Ugh, why does Facebook care about VR?!"
love it.
 
7:54 PM
11216 points in this geoguessr challenge: url.geoguessr.com/70y5 . Who can do better?
 
authentication.js:
var passport = require('passport'),
	LocalStrategy = require('passport-local').Strategy,
	passwordHash = require('password-hash'),
	pg = require('pg').native;

var connString = 'postgres://postgres:postgres@localhost/postgres';

var pgsql = new pg.Client(connString);

passport.use(new LocalStrategy(
	function(providedUsername, password, done) {
		pgsql.query('SELECT * FROM users WHERE username = ?', [providedUsername], function(err, res) {
			var user = res[0];
			if( !user ) {
@SomeKittensUx2666 isn't that what you do?
 
Nope, look closer at my gist
 
user1596138
How does require('passport') work?
 
user1596138
Doesn't require require a file?
 
also, your modules/authentication doesn't set exports, so auth will be undefined
 
7:55 PM
gotcha
see
I told you I went full retard
 
@Jhawins if there's no directory specified, it looks in node_modules
 
user1596138
Oh
 
updated*
@Jhawins also the .js extension is optional (so it seems)
 
user1596138
I assumed that was it
 
user1596138
7:58 PM
Damn
 
user1596138
That's convenient.
 
@LaughDonor 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.
 

« first day (1257 days earlier)      last day (3707 days later) »