« first day (1321 days earlier)      last day (3642 days later) » 

12:09 AM
@cspray I'm waiting for the ML issues to be fixed.
 
1:09 AM
mownin
 
1:37 AM
Do you alias classes when you use them into a file, when they have obstructively long or poor names? Example: ReflectionFunctionAbstract
 
@DanLugg No.
They get autocompleted by phpstorm, so why bother?
 
@Danack Readability in type-hinting.
 
PHPSTORM all the things.
 
lol, NetBeans does a good job of auto-ifying things in general too; it's not an issue of mashing the keyboard too much.
 
@DanLugg you might not like this but I do:
 
1:44 AM
Multi-lining?
 
function foo(
    SomeStupidLongTypehint $var1,
   SeriouslywhoDoesThisSomeStupidLongTypehint $var2
)
 
Yea. I... don't mind that. But sometimes I just look at the names and say "ALIAS ALL TEH THINGS NAOW"
 
I do that even without type hints....just can't standard more than 1 thing on a line.
 
any magento experts online?
 
DOMXPath gives me eye twitches. If not DomXPath, then XmlNavigator.
ReflectionAnything ticks me off too; would much rather see TypeInfo, and MethodInfo, etc.
I know its petty nonsense, but when code reads easier, its ... well, easier.
@Danack I might start doing this. NetBeans can auto-format that.
Wait, no it can't. Not well at least.
 
1:56 AM
Oh, commits/pushes at 4am are the best... Off to sleep now :)
 
2:09 AM
@HamZa but its still morning!
 
hey is it possible/worthwhile to pull strings from a txt file and run them through a script so they are hashed by md5?
 
@av17 Why?
As in, what are you accomplishing by doing that?
 
2:33 AM
@DanLugg so no one would be able to read the text. :)
 
lol
 
btw, belated haburdey to you dude
 
lol, it wasn't my birthday!
 
whose is it then?
 
 
2 hours later…
4:17 AM
stackoverflow.com/a/20793031/251311 from here - does anyone know how to make ob_start write to a file?
Cannot find a way to pass it directly to some stream not memory
a note: ob_start callback does not work with ob_get_clean()
 
 
1 hour later…
5:22 AM
mornings
 
6:20 AM
@DanLugg well i was thinking it was more of like a list of passwords,
@DanLugg but it would be more for practice i suppose. I'm not trying to run on anything more than localhost
 
6:34 AM
@av17 You shouldn't store passwords in plaintext in the first place.
Or are you trying to create a rainbow table?
 
6:49 AM
How do you call camelCase with the first letter capitalized?
 
please help me to to delete a cookie set by jquery http://stackoverflow.com/questions/23927143/
thanks!
 
@now-r-never Google "php remove cookie"
 
i tired ` $_COOKIE['cart']=null;
setcookie("cart", "", time()-3600);
unset($_COOKIE['cart']); `
but still its retaining old value
 
Jes
hi
good morning
 
7:07 AM
yo
morning
 
Jes
on ajax call i m getting json response and how would i access each value in javascript.
this is my response
and i want to get guid
i m trying to do
json.parse on success
getting this error
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 6 column 1 of the JSON data
 
7:33 AM
@Jes First of all, why are you transferring an unhashed password back to the user?
Why are you keeping an unhashed password at all?
Second, how are you generating that JSON response?
 
Anyone good with cURL here?
 
@GoldenJoe Just ask
 
Okay. Basically, I detailed my question here a few days ago: stackoverflow.com/questions/23881558/…
I'm still messing with it, but I'm kinda lost...I'm an Objective-C developer, rather than PHP/cURL, so I'm kinda flying by the seat of my pants.
 
I won't create canonical for Jaywalker :( because area is too broad. Too many issues are relating on it and too many different questions boil down to it. But yet in the same time, they are different questions :\
 
hmmf
 
morning. @salathe @JoeWatkins
 
Morning all
@GoldenJoe cURL is kinda whack. We recommend using Artax.
I know that's not your issue but it's worth mentioning.
 
8:05 AM
@salathe The GIF police isn't here yet?
 
I like it ...
 
anyone please help me in amazon chekcout
 
@SecondRikudo I'll un-onebox it in a wee while :)
 
@salathe No you won't :P
 
8:22 AM
xdebug's var_dump() is missing an essential feature: filename and line number from which the var_dump() was clalled
 
@tereško When was that meeting for the CMS discussion?
or is.
 
@Fabien it's something that will happen in june/july
 
Oh so a while to prepare.
How about the CTO stuff?
 
@tereško :| They have no issue tracker on GitHub either
 
@SecondRikudo I know
 
8:28 AM
morning
 
hi, how do you guys deal with apis that has daily limits, need a good strategy to deal with this
 
PR
@grasshopper Don't abuse the shit out of the API.
 
@SecondRikudo my ANSI C is not fluent enough
 
Neither is mine :D
Need some C-fu expert
 
@grasshopper Have a VPNChooser. When you're about to hit one limit, switch to a VPN. Architect this solution well and you should be able to add / remove VPNs at will at any time to scale up or down as your requirements demand
 
8:32 AM
Who do we have in this room?
 
@Jimbo thats abit out of my league
 
Why RTFM-quote answers are always better ..
 
@grasshopper Nah, the limit will be IP based. So you need to come from another IP. You could set up a cheap private box for like £5 a month. Make all your calls to the API go via that box instead (cURL over to it or something).
So instead of API Call, you would simply have cURL to box -> run API call from box -> return response to you
 
@Jimbo ok that makes sense, thanks will check it out
 
mornings
 
8:37 AM
mornign @DaveRandom
 
hi, @DaveRandom
 
@grasshopper The scaling I talked about was merely that the list of boxes (so you're foreach()ing around a list of boxes that you have set up), make it work no matter how many boxes are in this array. So then, have these boxes and ip's etc read from a config file. You can then remove / add to this list and your code will still do it's thing, albeit with more or less boxes at it's disposal. Think of it like that
@DaveRandom mon-to-the-ring
 
Guys, when I go to my work IP address in my browser I get an nginx screen. What's a method I can find out what machine this is going to on the network?
 
OK so apparently Oracle release 5 Java updates in the last 5 mins? I open my computer, get "please update Java", install u55, then immediately it asks me to install u60?
 
@DaveRandom Probably had a junior in pissing about with stuff ;)
 
8:41 AM
@Fabien it seems you're confusing WAN address & LAN address
 
You must not have logged in in the last 6 hours. Which is about the timeframe for a few java updates.
@AlmaDo Not so much confusing as don't know a thing about :P
 
@Fabien You mean your work public IP, and you want to know which internal machine is serving it?
 
Yes
 
Then you have to ask the network admin/check the firewall/routing config
There's no way to tell externally
 
You're currently addressing the network admin.
:)
 
8:42 AM
@Fabien if you'll "go" to your WAN (wide-area network) IP address, then you'll came to machine, which is your local area network gateway
 
Then what do you use as a firewall?
 
No idea. Probably. I should take a look at the router to see what type it is.
 
@Fabien It will probably be a simple port forward in the router if you are the network admin and you don't know how to find this :-P
 
The guy who set up everything left the other month and no one else knows much to anything about sys admin. I am probably the most knowledgable. hence it falling in my lap.
 
lolol
Sorry, I should be more supportive
Nahh... @Fabien LOL
 
8:44 AM
lol no. I see the humour.
 
Ahh ok. Well the first thing you need to do is take a look at the equipment on the end of your internet connection, which I'm guessing will be some kind of SOHO router
 
I think it's quite ridiculous myself.
@AlmaDo Ah fair enough.
@DaveRandom Let me go see if I can find it.
 
@Fabien pity you..
 
@Fabien Assuming it's DSL, go find the BT socket with a microfilter plugged into it with the DSL side patched into something. Tell us what that something is.
 
Vigor2760n. Listed as a Data router.
That connects through to our server cupboard.
 
8:46 AM
@Fabien Ahh that's a good start, Draytek are awesome
Do you know what the LAN IP of that box is?
 
Negative.
 
OK and your machine is a Windows box?
 
I'm loading up our wallet to see if I can get any clues before trying generic ones
OSX :D
 
OK then open a terminal and type route
 
usage: route [-dnqtv] command [[modifiers] args]
 
8:48 AM
gdi Apple
Do you have easy access to a sane operating system
 
I'll SSH in to the fedora box
 
and what's ridiculous here is that in this case I would include Windows as "sane"
 
Route returned some table thing, destination, gateway etc
 
@Fabien One of them will say default in the dest field
The corresponding gateway will hopefully be the router LAN IP
Unless you have multiple 0.0.0.0/0 entries, in which case it might get interesting...
 
Unfortunately not. Couldn't connect.
Let me fish around the wallet and see if there's anything
 
8:52 AM
@Fabien Doesn't mean that's not it. In fact, if port 80 is forwarded through, you won't be able to connect to the router on port 80. Try port 8080.
 
Same
 
hey guys\
 
@Fabien The sysadmin may have chosen a random port, and may have disabled the HTTP interface (I usually do) - care to share your public IP with me? You can email me if you want.
 
hey @tereško
 
tbf on one address I get infinite load.
 
8:54 AM
is there a way to check if a DNS update has propagated though-out various name servers ?
 
oh nope. there it goes. couldn;t connect
@DaveRandom Sure
 
maybe netstat -nr on OS X?
 
Do you have gmail btw?
I know your catchall
 
@bwoebi "various" was the important keyword
 
@DaveRandom Sent.
 
8:57 AM
@tereško I was talking to @Fabien
 
@bwoebi Gives me a nice list of internal IPs
 
@Fabien also one time "default" under "Destination"?
 
Yeah.
Which coincides with a wallet entry I have on that IP for router. Can't access it through chrome though.
 
could be the router IP… the gateway there
 
anyone from sweden here ?
I need to check DNS entry
 
9:01 AM
yeah, the router might handle different sources differently
@Fabien no idea how you're supposed to access router config?
ssh maybe?
 
Guys i'm having a serious problem with the facebook php sdk and i'm getting no help from the answers section. Can someone please check this out? stackoverflow.com/questions/23916954/…
 
@bwoebi wish I knew too :). I have a password and user.
 
maybe use a port knocker on your router…
If you have luck, that could help you…
 
@SecondRikudo :D
 
I'm trying so hard not to crease the spine.
 
9:12 AM
can you please ping airdog.com and verify that it returns 193.105.166.7 ?
we are experiencing some minor issues with sweden name servers and I need to check if it has propagated
 
@tereško works for me, right IP, 50ms round trip
which is pretty slow off this connection tbh, but it is at least working
 
any other verifications ?
 
Use a lookup tool to test a few public nameservers
 
dig -x 193.105.166.7

; <<>> DiG 9.9.1-P3 <<>> -x 193.105.166.7
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53263
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;7.166.105.193.in-addr.arpa.    IN      PTR

;; ANSWER SECTION:
7.166.105.193.in-addr.arpa. 86268 IN    PTR     e2.pro-9.com.
well..
 
@tereško 193.105.166.7, avg 35 ms.
@AlmaDo no, dig is the wrong tool. multiple things might point to one IP (but you just get one), but not multiple IPs to one address.
 
9:18 AM
@bwoebi I know
 
@tereško Avg 51 ms
36 packets transmitted, 36 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 48.670/52.433/76.163/5.863 ms
 
@Fabien the IP is the important part
 
193.105.166.7
@tereško I always liked this site whatsmydns.net/#A/airdog.com
 
Ah nice thanks. Bookmarked.
 
9:28 AM
@tereško Your ttl is set very long, it's probably local caches that are causing the problem
 
They've switched us to red milk at work. Which is just water disguised as milk. :(
Spoke to the upper echelons re router pass. No one knows it so we may need to contact the old admin to check.
 
Healthier milk
 
If you're having health (weight) issues, switching from semi to skimmed isn't going to help much :P
I add creamer to mine anyway. Coffee mate
@DaveRandom The weird thing about the public IP returning an nginx site is I am the only one who pro-actively uses nginx here. How does this sort of thing usually work? It points to a box. That box (with nginx on it) links to all our machines?
or perhaps to a hub. then the hub goes to the nginx machine first.
 
@LeviMorrison pppping
 
@Fabien Just a moment, I have a cunning plan
 
9:39 AM
Is it as cunning as a fox who's just been appointed Professor of Cunning at Oxford University?
 
Maybe even cunninger
 
@DaveRandom yeah , the old entry had ~18 hours set
 
Morning
 
Morning @DanLugg
 
9:58 AM
How do you intercept/read someone elses http request?
 
MGE
Hello, I have this one and is working properly:
 SELECT * FROM sounds INNER JOIN user_bands ON sounds.bandpic = user_bands.id WHERE soundid=:soundid LIMIT 1
*** it works when sounds.bandpic exists on user_bands, but if it doesnt exists, I want to show only results from sounds table, how can I fix that? Thanks!
 
@MGE You can press the up key to edit your last message.
 
^ LEFT JOIN
 
MGE
omg, thanks!
 
He's @AlmaDo not god.
 
10:07 AM
Anyone here good with networking and the such?
 
@SecondRikudo may be
 
20 hours ago, by Second Rikudo
I've a service that takes items from a list and hits a 3rd party service with the metadata (as if submitting a form). Now, I have an IP address listed for each item, I want that my request would appear (via Tor, Proxy, or whatever other means) from the same country as the IP listed in my file. Is it feasible?
 
Are there any free ssl certificates? Not for actual security but familiarising myself with using them.
 
Thank you
 
10:09 AM
@Fabien You can self-sign your own as well.
 
@SecondRikudo you're doing something nasty :-D
 
No idea what that means :D
 
@AlmaDo Not really
 
I know
you need two things. First, get country for specific IP. It's work for geoip. Next, get the proxy from that country. That is not too easy, but there are proxy-lists, usually. Proxy-servers there should not be trusted (if you want to pass some private data) - and also should be checked if they are anonymous. To check that, you may just query your own script with them and check, if $_SERVER contains any information, pointing to script, which initialized the query
also, you'll have to sort those proxies by countries (so apply geoip to their addresses too)
 
@SecondRikudo Better mail deliverability?
 
@DanLugg nah.. he's just spammer :D
 
lol
 
@Fabien hahahahaha
 
@DanLugg No
It's about importing items from a list on one site, to another.
 
The irony :)
 
10:14 AM
@Fabien /facepalm
 
The same person owns both list, so it's not a ToS violation
And it would be preferable to keep the items as though their arrived from the same country for statistics purposes.
 
@SecondRikudo Gotcha; was just playing detective based on our convo the other day :-P
 
hi all
 
hello
 
heya fellas, is there anyway I can check for an active_session ? So, i have an array of session_id()'s and I want to check which one is active and which isn't; Is there such a thing?
 
10:20 AM
@MoshMage Define "active".
 
@SecondRikudo active as in PHP_SESSION_ACTIVE ( pt2.php.net/manual/en/function.session-status.php )
(also, are you not on javascript room as well? Good Morning!)
 
yay. Is there javascript room?
 
@MoshMage I am everywhere, and nowhere.
 
@SecondRikudo today is Thursday. Go create day & night
 
@SecondRikudo I'm guessin you have no clue as well? (I didn't want to resort to a database table, what I want to accomplish is: when user logs in, it reads the sessions from a cvs file and checks if X session is active if it is, copy it to an array() and later show up the array to the user)
but since session_active() can only tell for the active session I can't really understand how to do that) [since a user can, for instance, not logout from the website therefore it won't be removed from the cvs file although the user closed its browser]
 
10:31 AM
0
Q: using regex to filter phone nos with exploits

cyclicI am filtering numbers from text. Number may contains some digits in word format. So it should flter out such numbers too. $arrwords = array_flip(array(0=>'zero',1=>'one',2=>'two',3=>'three',4=>'four',5=>'five',6=>'six',7=>'seven',8=>'eight',9=>'nine')); $s = "my long STRING with 124 mynumberis ...

 
@MoshMage why a cvs file instead of X?
 
(and what do you mean by X - if I may?)
@RonniSkansing ideally i want it in a json_encoded file as there's more infor I want to put in there
 
First SSL cert applied. (self cert). :)
It'd be an achievement if it wasn't so easy.
 
@MoshMage why are you handling user sessions inside a csv instead of any of the many alternatives?
 
@RonniSkansing well, first off: I didn't knew there were alternatives; Second: I don't want to use mysql for such tiny (and ever changing) data; Third: a cvs (and later a json_encoded string) is easier to grab from a ajax point of view [as I will be requesting it from ajax as well, not only php]
 
10:36 AM
What you are saying is very confusing to me
 
@RonniSkansing why is that so? (this is a honest question, I might be wrong in my approach and I'd like to know if I am)
 
@Fabien have you got a backup of the config file? Search for a file with a .all file extension
 
@DaveRandom What config file?
 
The router config
 
Oh that could be anywhere. :-/ I doubt it'd be around.
Anywhere as in not my machine
 
10:39 AM
Does the formatting configuration of PHPStorm allow for (without fucking up):
return someExpression()
    || someOtherExpression()
    || oneLastExpression();
 
@MoshMage its just different stuff. How we handle sessions, persistence, session states, and how the data is retrieved
If we could just take one thing at a time
User sessions.
 
@Fabien You don't have some kind of company shared drive for crap like that? :-/
 
@DanLugg Don't think it does.
Not sure though.
 
Neither am I, I don't have PHPStorm.
But I know that most any IDE I've used can't get it right; namely NetBeans.
 
@DaveRandom We have a shared drive called Uranus but i doubt it'd be in there. I'll check.
4
 
10:42 AM
Ok, from the top then:
My user logins to a CakePHP Framework, which has the $this->Session helper. I save sessions there. That is done, working and fine.
After I made that, I thought I could use a "online users count and get their username", so now I need a way to store the sessions in some way so I can retrieve them - while checking for its validaty
 
@Fabien So, it sounds like someone took Cloud-to-Butt seriously...
 
@DanLugg heh. Yeah there's plenty of Uranus jokes in the office every day.
 
@Fabien snigger snigger snigger
 
@DaveRandom I can't find anything in Uranus or on the old admin mac.
 
@MoshMage the sessios are already saved, now you are trying to collect active sessions and put somewhere, for display of number of online users?
 
10:44 AM
@RonniSkansing exactly that! (you made it sound simple.)
 
How about, user logs in, write user id to db table (active sessions) along with a expiration time
everytime a user does something on your site, you update the expiration time
then you can see how many users have been active within a specific time
 
Because I didn't want such exausting database connection as updating a field at every page-load feels like an overkill (and I don't know how the database would react to, imagine, 100updates in 30sec)
 
well how do you feel about doing that to a csv file?
 
@RonniSkansing the cvs file would only be (re)written once every log-in, and then match said sessions inside agains a active_session checker - so I feel it would be less stressfull for the system
 
@Fabien I'm somewhat of ideas for how to break into it without nuking the config then, in that case. You'll have to ask the old admin what the password is :-/
 
@DaveRandom lol. We'll go the non-nuke route :) Thanks for the help though. Realistically there's many dumb factors at play. Starting with me being the goto guy for these things.
Fortunately we discover this issue when I am just poking around the place rather than when we actually need to connect to the router.
 
also you could consider using a nonrelational db
 
@RonniSkansing I feel i fall into this answer instead: stackoverflow.com/a/2357027/587811 but Ill ask the team-leader what's better (I try to avoid db connections for crap like this which is 2 text values)
 
@MoshMage it sounds like you are focusing on performence. Unless you know exact values of different types of techniques it is hardly fair to say "I avoid crap like this" if you do not know the timing
 

« first day (1321 days earlier)      last day (3642 days later) »