Skip to content

Instantly share code, notes, and snippets.

@ailabs-software
ailabs-software / gist:3136976
Created July 18, 2012 15:36
Is this ECMAScript okay?
var __objectInheritanceCalculated = [];
while((function()
{
/* There is a object class that has not been processed */
var __t = 0;
for (var m in objectclasses) { __t++; }
if (__t <= __objectInheritanceCalculated.length) return false;
return true;
})())
{
@ailabs-software
ailabs-software / gist:2847283
Created May 31, 2012 23:49
Is this good code?
if ($(_parent).hasClass('item'))
{
$(_parent)[selected && $(this).closest('table').find('.item:not(.selected)').length == 0 ? 'addClass' : 'removeClass']('selected');
var _grandparent = $(_parent).parent().parent().parent().parent().parent().siblings();
if ($(_grandparent).hasClass('item')) $(_grandparent)[selected && $(_parent).closest('table').find('.item:not(.selected)').length == 0 ? 'addClass' : 'removeClass']('selected');
}
server
{
server_name *.theamericanpolitician.com;
listen 80;
location ^~ /socket.io
{
proxy_pass http://unix:/tmp/$SERVER_NAME.socket:;
proxy_set_header X-Real-IP $remote_addr;
}
root@yesmav:~/pmgr# host ftp.us.debian.org
ftp.us.debian.org.com has address 23.21.224.150
root@yesmav:~/pmgr# dig A ftp.us.debian.org
; <<>> DiG 9.7.3 <<>> A ftp.us.debian.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14715
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
root@yesmav:~/pmgr# host ftp.us.debian.org
ftp.us.debian.org.com has address 23.21.224.150
root@chatmavis:~/packagemgr# dig A ftp.us.debian.org
; <<>> DiG 9.7.3 <<>> A ftp.us.debian.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14715
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
root@yesmav:~/pmgr# dig A ftp.us.debian.org
; <<>> DiG 9.7.3 <<>> A ftp.us.debian.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14715
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ftp.us.debian.org. IN A
@ailabs-software
ailabs-software / gist:2338679
Created April 8, 2012 17:38
wget going straight IPv6
root@yesmav:~/pmgr# wget http://ftp.us.debian.org/debian/
--2012-04-08 13:36:03-- http://ftp.us.debian.org/debian/
Resolving ftp.us.debian.org... 2610:148:1f10:3::89, 2001:500:61:28::70
Connecting to ftp.us.debian.org|2610:148:1f10:3::89|:80... failed: Network is unreachable.
Connecting to ftp.us.debian.org|2001:500:61:28::70|:80... failed: Network is unreachable.