« first day (1946 days earlier)      last day (2987 days later) » 

12:02 AM
basically, what I meant was: is there an ability to extract specific keys from the given array and assign to variables
because the example in that RFC never really say it
 
> Instead of having implied numbered keys from zero, list() can also now contain explicit keys, instead.
Though, that word ordering.....
 
.. it's kinda "the thing" in that RFC: a lot of examples of "how to use it", but no example showing *what it does"
 
> Empty elements are not allowed where keys are specified, because there is no need for them
 
12:12 AM
@Danack make that 22:11
 
\o/
It's the 14th already somewhere right?
 
hmmm... it's a bit soon no?
 
too soon
 
@FélixGagnon-Grenier not for NZ
 
about 12h too soon, if I am not mistaken
 
ah, right
 
it's the 12th here...
 
12:33 AM
PHP is nice for simple manipulations … ^^ bob$ pbpaste | php -r 'echo hex2bin(stream_get_contents(STDIN));' | pbcopy … hex2bin() on clipboard <3 (OS X)
 
well .. damn... looks like I did fuck up the direction of dependencies in my damned lib
 
awesome
 
13th in NZ, for a while longer still
Sunny afternoon.
 
Hi there
I have a quick question, if you don't mind about executing php in terminal
 
Wes
12:46 AM
oh btw. muricans forced the whole world into that french climate change summit.... and this is the result
democracy is a failure
 
@TheQuantumPhysicist just k...
 
I would like to execute the Wordpress function "wp_hash_password($password)" from terminal. Do you think this is possible?
I need to hash passwords and compare them to its database... I'm stuck and don't know how to proceed
 
@TheQuantumPhysicist I don't usually word press - but I'm sure there are ways to do it, like: wp-cli.org
 
@Wes americ's supreme court has nothing to do with democracy
 
I was hoping for a simple terminal way to do it without involving other libraries or programs in the interest of future stability
 
12:49 AM
@TheQuantumPhysicist just find the file where the function is defined, include it and call the function
 
You'd probably be better off asking on:
 
People there seem to be no experts in linux calls
I expect stackoverflow people to handle this better
Actually I did that call
 
it has nothing to do with linux
 
php -r 'include "wp-includes/pluggable.php"; wp_hash_password("Hello");'
 
@tereško actually it may not be trivial......
 
12:50 AM
Could you explain the reason?
 
If someone went to the bother of writing a whole plugin to allow it to be done, that implies that you can't just include a file or two, and then be able to call wordpress functions.
Otherwise they wouldn't have bothered to write the plugin.
 
Well all a plugin does is replace a function basically...
I did write plugins before
even the plugin writer says that
 
as you might notice, that code require two constants to be defined
 
I'm thinking, is it possible to include one very general file that includes the whole website?
 
and what's more important: that function is jut a dumb wrapper
 
12:53 AM
I tried index.php but doesn't work
 
what you really want is to call this method: github.com/WordPress/WordPress/blob/master/wp-includes/…
 
Actually I tried that already, and I got more and more dependencies :)
There's a class called wp_hasher that has to be instantiated
 
no
 
Then I did
php -r 'include "wp-includes/pluggable.php"; $wp_hasher = new PasswordHash(8, true); $wp_hasher->HashPassword( "Hello" );'
 
why?
 
12:56 AM
HashPassword is a member function of wp_hasher
 
if you just need the PasswordHash class, why are you not including it directly?
are you really unable to debug your own code?
 
It's not my own code
It's Wordpress code
 
and yes, if you are using Wordpress, then it counts are "your own code"
you shouldn't be using shit you don't understand
 
Well I kept following the chain until I gave up
every time a get to the next piece something else is missing
 
what chain?
 
12:58 AM
Chain of dependencies
 
PasswordHash class has NO DEPENDENCIES
 
OK I'll try again
 
ya know what, you must go in the ignore list, I dont have the patience to deal with this amount of stupid
k bye
 
?
Why are you being impolite? If you don't want to answer just don't answer
 
@TheQuantumPhysicist and similarly, if someone is being rude to you - just use the ignore button. But I repeat what I said earlier - if using WP on the CLI was trivial, that plugin wouldn't exist, and searching for "wordpress cli" would return more results.
 
1:17 AM
@Andrea got majority ... hope it stays that way :)
/me sleeps, nn all
 
@JoeWatkins omg. nice!
 
1:32 AM
@JoeWatkins 22:11... exactly 2/3. Tight race, then. But at least it's there
I hope it can exceed 2/3, not sure if I can merge with good conscience otherwise
I also wonder if maybe I should just restrict it to constants again for keys
Still... I guess 2/3 is positive
 
@Andrea the point of 2/3 is having a clear majority... barely meeting a high threshold is still meeting a high threshold
 
1:52 AM
Better than Fight Club. That needed a perfect 5/7.
 
@PaulCrovella I know, but nonetheless
 
Also I'm wondering if list() keys should only work with short syntax (i.e. []) if that passes
 
I think that would be confusing... I'd think that any array declaration style would work the same regardless of how that array was later used...
 
@Andrea if short syntax passes they should only diverge if one or the other is removed entirely, otherwise it's more than just a simple alternative syntax
imagine how screwy it would get if array() and [] functionally diverged
 
2:02 AM
@Andrea if you do that, I'll vote against it because there's no reason to do that.
 
@PaulCrovella yeah true
though it'd be nice to push people towards the [] syntax as it actually looks like the array syntax
anyway, goodnight
 
nn.
 
@Andrea I guess people will anyway use it after a short time … just like nobody writes array() today.
 
'nobody' ?
 
2:21 AM
geez, finding a simple LFI-protection regex seems impossible >.<
 
2:33 AM
paging @ScottArciszewski ^^
 
   private function rejectAbsoluteAndDotPaths(string $filePath) : string
    {
        if (0 === strpos($filePath, '/')) {
            // throw: absolute path - not allowed
        }

        $pathSegments = explode('/', $filePath);

        foreach ($pathSegments as $pathSegment) {
            if (in_array($pathSegment, ['', '.', '..'], true)) {
                // throw: relative path traversal not allowed
            }
        }

        return $filePath;
    }
went with this - decent enuff
actually, the first check is redundant
 
Probably. Calculating the final filepath, and then checking that it's a sub-directory of the expected location might be safer?
 
@Danack this is just a VO that doesn't know anything but the string. It's received in a system that doesn't even have the files locally
so I can't use any FS access to do checks
/me checks for dangerous strings for this stuff too
 
btw file:///this_is_root/
possibly.
You'll notice how I don't actually give people advice on how to secure code....
 
// would be caught
yeah, that's fine, no worries :)
this is for the github API stuff btw - can't do api calls just to check :P
yeah, need to get rid of another set of chars
?*etcetc
probably gonna just restrict and make it fail eagerly, then allow crazy people with crazy chinese file names deal with it later, when it comes up
 
2:54 AM
if (false !== strpos($filePath, '\\')) {
    // throw: Get. Out.
}
 
Magic @DASPRiD gave me this one:
preg_match('(^/|//|/..?(?:/|$))', $path);
probably worth a shot, writing tests
 
escape those dots
 
3:28 AM
@Ocramius what exactly are you trying to accomplish?
 
@ScottArciszewski basic LFI protection for a string that crosses various address spaces on different machines
 
in general...
 
to be clear, none of these files will pass through inclusion, but they may contain sensitive data, so I need to kill any path that attempt direct directory traversal escaping
 
@PaulCrovella found it again: landaulaw.co.uk/restrictive-covenants
> For this reason, employers may require employees to give a fresh acceptance of the old covenant on promotion, or request that they sign a new employment contract containing the new covenants. In addition, there needs to be “consideration” in return for an employee entering into a restrictive covenant. In other words, there needs to be “some real monetary or other benefit”. An offer of employment would be treated as a “benefit” for these purposes.
 
3:33 AM
^ that's how I do it
 
@ScottArciszewski can't realpath, as the file doesn't exist on the worker processing the request
 
Not sure if I'm missing anything obvious
 
I'd also check for NUL bytes
 
very good point indeed
 
3:44 AM
I need to log off, my headache's killing me today
ttyl
 
4:23 AM
1
Q: Risks of using php.ini-development as the default php.ini

Abhay ShuklaSo, while developing stuff using php, I backup the original php.ini and rename and use the php.ini-development at the php.ini file. After I am done, I restore the default php.ini. Now, my question is this: What are the drawbacks and risks or continuing to use the php.ini-development` as the norm...

 
mornin' guys!
 
Morning Gourab
 
4:43 AM
hey guys can somebody help me.... its something very silly i guess :P
i have a router.... and when i connect to my public ip address the login page for my router gets opened... But I want an IP address for my PC, is there anyway that I could tell the router to redirect the request to me...??
 
5:14 AM
@GourabNag
you are using which system??
 
LINUX!! (ubuntu)
 
run ifconfig in terminal
@GourabNag
 
gourab@gourabnag:~$ ifconfig
eth0 Link encap:Ethernet HWaddr fc:aa:14:4f:6f:61
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::feaa:14ff:fe4f:6f61/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:258536 errors:0 dropped:0 overruns:0 frame:0
TX packets:237031 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:239518645 (239.5 MB) TX bytes:57824838 (57.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
 
192.168.0.8 is your PC ip address
@GourabNag
 
no whats my pc's public ip adress..
my local adress is 192.168.0.8, that even a noob can tell... :P
 
5:24 AM
hey ppl
 
either 192.168.0.1 or 192.168.0.255
@GourabNag
Hello @AboutLeros
 
thats my ip in my local network i know that dude
 
how you doing dudes? :)
 
bad
........
 
@GourabNag :( why?
 
5:26 AM
cannot find my public address for my pc... i wanna curse my router...
\/\/\//\//\/\/\/\/
 
@GourabNag just google "what is my ip"
 
really?
 
@rtheunissen .. i did but it opens nothing just blank... and i do have apache installed and runnin in my ubuntu
 
Has nothing to do with apache
 
5:29 AM
i searched for what is my ip and when i send the request to that ip.... nothing is opened
 
Does whatismyip.com show blank?
 
huh
fool
 
@rtheunissen lol
 
45.116.190.203
 
moin
 
5:31 AM
morning joe
 
Morning @JoeWatkins
 
@JoeWatkins Morning, Good sir :)
 
when i try access that ip... nothing gets loaded
 
@rtheunissen scanned over email, will shoot reply in a while ...
 
mornin @JoeWatkins
 
5:33 AM
@JoeWatkins take your time, taking it easy this weekend.
 
cool
 
@GourabNag run this command
dig +short myip.opendns.com @resolver1.opendns.com
@GourabNag
 
45.116.190.203 :) there must be some problem with my apache i guess for not allowing outside connections.... THNX GUYS!
 
@GourabNag localhost definitely works?
 
yeah.. sure about that lemme post a screenshot of it...
 
5:42 AM
listen address and or vhost setup is wrong probably
 
ohkay..... any ideas how could i make that correct.. :P
 
pastebin apache.conf/httpd.conf
I only slept for four hours, I feel broken ...
 
I noticed..
 
take coffee @JoeWatkins
 
LOL!! go get yourself some sleep @JoeWatkins!!!
 
5:44 AM
I've been broken lately, so I slept all day.
@JoeWatkins work, or dogs?
 
not sure, just woke up ...
I can never go back to sleep once awake ... went to bed late and body just decided to get up ...
circadian rhythms are royally fucked by computer screens ...
 
ha ha ha
 
Naps are where it's at.
 
get some strong drink joe
it will make you stronger
 
I miss being able to nap ... can't really fit those in ... kids will be up in half hour, then my life is pretty much over, because it's the weekend ...
 
5:51 AM
enjoy every moments
 
kids ruin everything
 
with kids
this moments will never come again
 
I kid, I kid ... they're great, but they do ruin your life a little ... and do make it impossible to sleep during the day ...
 
A good dad doesn’t always tell the truth.
 
Keep them busy with something. My dad would set us up with DOS games and nap for hours.
 
5:58 AM
@SagarNaliyapara the exact opposite is true !
 
Routine and discipline.
child will learn from parents
be selfless
for some period of time
 
yeah from 0-18 ...
 
ha ha ha that's very long period
 
that's kinda how it works though ...
I fear the sarcasm in my "kids ruin everything" bit was missed ... I'm only fucking about ... they're the best thing I done with my life so far ...
@rtheunissen how did you send me that last message ?
 
What do you mean how?
 
6:07 AM
nvm, I found it ... was in different folder in gmail for some reason
 
I never know which address to send to.
Might be that.
Thought you meant chat message.
 
good morning
 
what's the name of your kid @JoeWatkins?
 
6:24 AM
Emma, and Lewis ...
replied there @rtheunissen
 
Thanks @JoeWatkins, sounds good.
 
6:43 AM
Feb 8 at 17:57, by NikiC
@JoeWatkins You're saying there's a serial killer out for php core devs?!
@NikiC well I don't want to start any rumours ... but ... @Sara put pictures on twitter that appear to show her burning bones in a fire pit ...
Hey, Internet; Is it time for a new fire pit? (Look closely) https://t.co/Nx1icJZtcZ
 
7:20 AM
mornin
 
moin
 
can somebody answer this question stackoverflow.com/questions/35303233/…
 
moin Joe,tereško
 
'nin
 
@tereško working on saturday?
 
i'm not currently employed at all
just woke up early
 
posted on February 13, 2016 by krakjoe

- fix explicit array cast for ASSIGN_DIM - add Threaded::notifyOne - fix bug in Threaded properties causing incorrect objects to be fetched by read - fix bug in trait aliases - fix INHERIT_NONE breaking lambdas - fix bug in con...

 
great routine and discipline @tereško
 
it has nothing to do with discipline
it's a result of intentional conditioning
 
forced discipline
 
7:43 AM
Can anyone help me a bit with this one? (just answer the poll)
Your in-house software project code quality is:
 
where is @MadaraUchiha ??
 
8:03 AM
happy weekend enjoy see you on monday :-D
 
@GourabNag hmm?
 
LOL, there you are...
where were when naruto was fighting Pain.. sleeping??
 
8:22 AM
Hi guys does pyroCMS still on beta ?
 
@ELOISSIFIAhmed yes
 
@Ocramius can I start developing with it or I have to use the old one built with codeIgniter ?
 
how to redirect example.com to sub.example.com using .htaccess?
 
@ELOISSIFIAhmed no clue - is PyroCMS your choice for a reason?
 
8:28 AM
anyone have an idea?
 
yes they give an old website coded with codeIgniter 2 and they told me to upload it on local and change styling and add new features for any new client its an -elibrary
@Ocramius what do u think
 
Then don't rewrite it :P
do what they told you to do :D
 
I hope you are aware that a migration of even small-to-medium site would take 3 months or more
...this is what happens, when people learn frameworks instead of programming
 
@tereško I shouldnt do a migrartion and rewrite it
im fighting to make that old shit work on local
 
you will have to elaborate on "fighting"
also, I hope that, when you said "local", you actually meant a VM
 
8:38 AM
yes Im using Homestead
 
your development environment should be mimicking the production environment
is the production environment running ubuntu with php 5.6 and HHVM on nginx?
 
yes
but its runing with php7.0
 
or is the production environment actually on apache with php 5.3
because I am fairly sure that codeigniter 2.0 doesnt work on php7
 
Wes
mornings
 
@Wes perhaps, what's your point ?
 
Wes
8:44 AM
:P
 
@tereško yes it doesnt work with php7
should I upgrade the project first or work with that old version of codeigniter
 
Wes
@JoeWatkins this maybe? pastebin.com/vj91jd2Sa
 
so it will work with php5
i mean php7
 
I can't believe that was a thing ...
 
@ELOISSIFIAhmed I asked you whether your development environment (homestead) was compatible with your production environment, and you answered: YES
 
Wes
8:46 AM
@JoeWatkins i miss the '90
 
do you understand what the terms "development environment" and "production environment" even mean?
 
@tereško i mean no its not compatible
 
then why are you trying to run it on homestead?
 
Im using the latest laravel homestead box
sorry but im a newbie
 
@Wes there is a solution to that
 
8:48 AM
@ELOISSIFIAhmed what are the specs for the production environment?
 
Wes
 
I have to install the same version of php and mysql in production envirement and then ill be ready to go
 
you also need to install same version of webserver
 
Wes
omg this is beautiful
 
@tereško sure
 
8:50 AM
.. which would be easier if you started out with a blank OS (with matching version to the prod-env .. which is likely to be some LTS Debian)
 
ill do that
im on ubuntu 15.10
 
and on which version is the production environment?
 
ok wait lemme check
 
cat /etc/*-release
 
I have no ssh access to the server
 
8:53 AM
@wes ...
In 2016, geocity can only be used to mean an *actual* city ... what a time to be alive ...
hehe
 
Wes
lol
i miss the naivety (is this an actual word?) of 90s
 
it's a word ...
I remember very little of the 90's ...
 
Wes
you can't be much younger than me :\
uh, the wind did even more mess tonight, can see garbage everywhere, a fallen tree and roof tiles
 
born in 84, so I was really young at the start, and high as a fucking kite by the end ...
 
Wes
ahaha
 

« first day (1946 days earlier)      last day (2987 days later) »