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 <stdio.h> | |
#include <unistd.h> | |
int main() | |
{ | |
/* fork a child process */ | |
fork(); | |
/* fork another child process */ | |
fork(); | |
/* and fork another */ |
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
# Pdock rapidly sets up a tiny platform for you automatically discover and | |
# serve your docker services. It uses the hipache and skydock projects | |
# to enable rapidly connecting to your containers via subdomain names. | |
# Only port 80 has to be opened, and UDP,TCP,HTTP,WebSocket should | |
# work (mostly) out of the box | |
# | |
# Copyright 2014 Hamilton Turner <hamiltont@gmail.com> | |
# | |
# | |
# Examples: |
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
hamiltont$ brew ls pygtk -v | |
/usr/local/Cellar/pygtk/2.24.0/AUTHORS | |
/usr/local/Cellar/pygtk/2.24.0/bin/pygtk-codegen-2.0 | |
/usr/local/Cellar/pygtk/2.24.0/bin/pygtk-demo | |
/usr/local/Cellar/pygtk/2.24.0/ChangeLog | |
/usr/local/Cellar/pygtk/2.24.0/COPYING | |
/usr/local/Cellar/pygtk/2.24.0/include/pygtk-2.0/pygtk/pygtk.h | |
/usr/local/Cellar/pygtk/2.24.0/INSTALL_RECEIPT.json | |
/usr/local/Cellar/pygtk/2.24.0/lib/pkgconfig/pygtk-2.0.pc | |
/usr/local/Cellar/pygtk/2.24.0/lib/pygtk/2.0/demos/__init__.py |
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
# hadoop jar /share/hadoop/mapreduce/hadoop-mapreduce-examples-2.2.0.jar grep /input /ouput 'dfs[a-z.]+' | |
14/02/27 21:15:11 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id | |
14/02/27 21:15:11 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId= | |
14/02/27 21:15:11 WARN mapreduce.JobSubmitter: No job jar file set. User classes may not be found. See Job or Job#setJar(String). | |
14/02/27 21:15:11 INFO input.FileInputFormat: Total input paths to process : 23 | |
14/02/27 21:15:11 INFO mapreduce.JobSubmitter: Cleaning up the staging area file:/tmp/hadoop-root/mapred/staging/root1084670987/.staging/job_local1084670987_0001 | |
java.lang.NullPointerException | |
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getBlockIndex(FileInputFormat.java:390) | |
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:365) | |
at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:491) |
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
import docker | |
import bgtunnel | |
import sys | |
def list_images(target_host): | |
print('Targeting %s' % target_host) | |
forwarder = bgtunnel.open(ssh_user="hamiltont", | |
silent=True, | |
ssh_address=target_host, | |
host_port=5555, |
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
> # Setup data | |
> names <- c("Field 1","Field 2","Field 3") | |
> area <- c(1.3,1.4,1.1) | |
> soil <- factor(c("wet","dry","wet")) | |
> worms <- data.frame(names,area,soil) | |
> worms | |
names area soil | |
1 Field 1 1.3 wet | |
2 Field 2 1.4 dry | |
3 Field 3 1.1 wet |
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
> # Using autocomplete here does nothing... | |
> plot(x,y,notc[Tab] | |
> # Using autocomplete here shows the notch option | |
> barplot(x,y,notc[Tab] | |
> barplot(x,y,notch= |
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
===============FILE 1 - test.sh================== | |
#!/bin/bash | |
test_function () { | |
echo hi there | |
} | |
bash subshell.sh | |
===============FILE 2 - subshell.sh================== |
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
#!/bin/bash -E | |
# If you are running a large number of installs back to back | |
# (e.g. for FwBm development), then setting this variable | |
# will cause apt-get and wget to use your proxy server. If | |
# your proxy server has a cache for static content, this can | |
# save you quite a lot of download time | |
# export http_proxy=http://10.0.1.0:3128 |
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
sudo apt-get -y install \ | |
cmake build-essential automake `# Needed for building code` \ | |
curl wget unzip `# Common tools` \ | |
software-properties-common `# Needed for add-apt-repository` \ | |
git-core mercurial `# Version control systems` \ | |
libpcre3 libpcre3-dev libpcrecpp0 `# Regular expression support` \ | |
libssl-dev libcurl4-openssl-dev `# SSL libraries` \ | |
libmysqlclient-dev \ | |
mongodb-clients \ | |
libsqlite3-dev sqlite3 `# Database libraries` \ |
OlderNewer