This file contains 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 <unistd.h> | |
#include <sched.h> | |
#include <stdio.h> | |
int _start_container(void *arg) | |
{ | |
return execl("/bin/bash", "bash", "-c", "echo $$", (char*) NULL); | |
} | |
int main(int argc, char *argv[]){ |
This file contains 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
> env DYLD_PRINT_LIBRARIES=1 git clone https://github.com/nixos/nixpkgs | |
dyld: loaded: /Users/bernerdschaefer/.nix-profile/bin/git | |
dyld: loaded: /nix/store/m911p5va12l3h0hb888fv2lg9vw6h0lf-zlib-1.2.8/lib/libz.1.dylib | |
dyld: loaded: /usr/lib/libiconv.2.dylib | |
dyld: loaded: /nix/store/r3y5kv9yfz3x50b62rb7q36dkrg9swia-gettext-0.18.2/lib/libintl.8.dylib | |
dyld: loaded: /nix/store/8q141rqwrpgnapzv44hbwqag78fbirzq-openssl-1.0.1i/lib/libcrypto.1.0.0.dylib | |
dyld: loaded: /usr/lib/libSystem.B.dylib | |
dyld: loaded: /nix/store/qw2dgl7xdqj574g3lrafw9rq7npcshhy-gcc-4.8.3/lib/libgcc_s.1.dylib | |
dyld: loaded: /usr/lib/system/libcache.dylib | |
dyld: loaded: /usr/lib/system/libcommonCrypto.dylib |
This file contains 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
" clone github.com/fatih/vim-go into /tmp, and run vim | |
" with `vim -u path-to-this-file` to test out the plugin. | |
set nocompatible | |
syntax on | |
filetype plugin indent on | |
" add vim-go plugin to runtime path | |
set rtp+=/tmp/vim-go |
This file contains 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
class << self | |
alias mess_with_bernerd define_method | |
end | |
mess_with_bernerd(:foo) do | |
# | |
# | |
# | |
end |
This file contains 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
class << self | |
alias mess_with_bernerd define_method | |
end | |
eval(<<-EOS) | |
mess_with_bernerd(:foo) do | |
puts "but can you handle string eval???" | |
end | |
mess_with_bernerd(:bar) do |
This file contains 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
# Activate the gem you are reporting the issue against. |
This file contains 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
// Naive proxy server to route data from 12345 to postgres as 5432 | |
// | |
// javac Server.java | |
// java -server Server | |
import java.io.IOException; | |
import java.nio.channels.*; | |
import java.nio.ByteBuffer; | |
import java.net.*; |
This file contains 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
## Sibling constant resolution/scoping | |
module X | |
class Y; end | |
end | |
class X::Z | |
def self.y | |
Y | |
end | |
end |
This file contains 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
10.times do |i| args = File.readlines(__FILE__)[__LINE__-1].match(/\|(.+?)\|/)[1].split(/[, ]+/) | |
p args | |
end |
This file contains 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
def wait_conditionally_until | |
if page.driver.wait? | |
page.wait_until do | |
begin | |
yield | |
rescue Selenium::WebDriver::Error::WebDriverError => e | |
# do nothing - continue to wait for timeout | |
end | |
end | |
else |
OlderNewer