Skip to content

Instantly share code, notes, and snippets.

<script>
$(function() {
$(".tree_node").click(function(e) {
e.preventDefault();
id = $(this).attr("id");
vis = $("#details_" + id).is(":visible");
$(this).toggleClass("tree_closed",vis);
$(this).toggleClass("tree_open",!vis);
$("#details_" + id).toggle(!vis);
});
<?php
if (!extension_loaded('pcntl')) {
print 'no pcntl';
}
@iancoffey
iancoffey / gist:1943440
Created February 29, 2012 18:45
pointless
if (!empty($id)) {
$group_name = h($metagroup['name']);
} else {
$group_name = h($metagroup['name']);
}
Fetching: thor-0.18.1.gem (100%)
Fetching: busser-0.4.1.gem (100%)
Successfully installed thor-0.18.1
Successfully installed busser-0.4.1
2 gems installed
-----> Setting up Busser
Creating BUSSER_ROOT in /opt/busser
Creating busser binstub
Plugin bats installed (version 0.1.0)
-----> Running postinstall for bats plugin
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network $named $time
# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### Keybase proof
I hereby claim:
* I am iancoffey on github.
* I am iancoffey (https://keybase.io/iancoffey) on keybase.
* I have a public key whose fingerprint is 832D 4FAB B7D1 06BC 6510 6D9B FF60 74AA 8E0A 2506
To claim this, I am signing this object:
root@vagrant:~# apt-get upgrade openssl libssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-headers-generic-lts-quantal linux-image-generic-lts-quantal
The following packages will be upgraded:
accountsservice apparmor apt apt-transport-https apt-utils apt-xapian-index base-files bash-completion bind9-host binutils ca-certificates
dbus dkms dmsetup dnsutils dosfstools dpkg dpkg-dev file gnupg gpgv grub-common grub-pc grub-pc-bin grub2-common ifupdown initramfs-tools
initramfs-tools-bin iproute isc-dhcp-client isc-dhcp-common language-pack-en language-pack-en-base language-pack-gnome-en
- name: iptables_rules | get iptables rules
shell: iptables -L
register: iptablesrules
sudo: true
- name: add_dns_chain | add UDP DNS iptables chain
command: iptables -N DNS_udp
sudo: true
when: iptablesrules.stdout.find("DNS_udp") == -1
register: dns_chain
@iancoffey
iancoffey / gist:bb557167229fa81a0964
Created September 11, 2014 22:26
Toggle between tabs and spaces
function! ToggleTab()
if &expandtab
set shiftwidth=8
set softtabstop=0
set noexpandtab
else
execute "set shiftwidth=".g:my_tab
execute "set softtabstop=".g:my_tab
set expandtab
endif
irb(main):013:0> module A
irb(main):014:1> module B
irb(main):015:2> def self.something
irb(main):016:3> new()
irb(main):017:3> end
irb(main):018:2> end
irb(main):019:1> end
=> :something
irb(main):020:0> A::B.something
NoMethodError: undefined method `new' for A::B:Module