This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
int run(char **argv, char **envp) { | |
pid_t chipr = fork(); | |
if (chipr == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Percent | Source code & Disassembly of rev26_2 | |
------------------------------------------------ | |
: | |
: | |
: | |
: Disassembly of section .text: | |
: | |
: 0000000000400760 <paws>: | |
: void paws() { | |
: #ifdef USE_A_POSIX_BARRIER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Incoming, allow TCP 22, 80, 443 and all ICMP except redirect. | |
# Outgoing, allow everything. | |
iptables -P INPUT DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD DROP | |
iptables -F | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
def marmoset_patch(old, new, extra_globals={}): | |
g = old.func_globals | |
g.update(extra_globals) | |
c = inspect.getsource(new) | |
exec c in g | |
old.func_code = g[new.__name__].func_code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "lucid64" | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.hostname = "puppet" | |
config.vm.network :private_network, :ip => "192.168.50.100" | |
config.vm.provision :shell, :path => bootstrap.sh | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "cpath_env $DIRECTORY" sets paths appropriately for making gcc+autoconf | |
# pick up C libraries installed with ./configure --prefix $DIRECTORY. | |
# example: | |
# cd /tmp | |
# tar xf ~/libfoo.tar.gz | |
# cd libfoo | |
# ./configure --prefix=$HOME/stuff | |
# make && make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import thread | |
import threading | |
import sys | |
import dis | |
import os | |
done = threading.Semaphore(0) | |
A = [0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "lucid64" | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.define :lucid do |t| | |
end | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int foo(FOO_ARGS); | |
int main(int argc, char **argv) { | |
printf("%d!\n", foo()); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int hork(int x, int y) | |
{ | |
return x * (x + y); | |
} |
OlderNewer