Skip to content

Instantly share code, notes, and snippets.

View braz's full-sized avatar

Eoin Brazil braz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am braz on github.
  • I am eoinbrazil (https://keybase.io/eoinbrazil) on keybase.
  • I have a public key whose fingerprint is 9C5E F459 EB09 35CD 1538 4814 A9D1 F04C 1A21 F0EB

To claim this, I am signing this object:

Find out what shell you are currently running

echo $0

Pass output of command to another as argument

using backtick (`)

somecommand `anothercommand`
@braz
braz / 0_reuse_code.js
Created June 4, 2014 15:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// kills long running ops in MongoDB (taking seconds as an arg to define "long")
// attempts to be a bit safer than killing all by excluding replication related operations
// and only targeting queries as opposed to commands etc.
killLongRunningOps = function(maxSecsRunning) {
currOp = db.currentOp();
for (oper in currOp.inprog) {
op = currOp.inprog[oper-0];
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) {
print("Killing opId: " + op.opid
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
diff --git a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -285,6 +285,7 @@
extern int sysctl_tcp_adv_win_scale;
extern int sysctl_tcp_tw_reuse;
extern int sysctl_tcp_frto;
+extern int sysctl_tcp_syn_acceptq_pct;
extern int sysctl_tcp_low_latency;
extern int sysctl_tcp_dma_copybreak;
@braz
braz / enronemailrocksdbsize.txt
Last active August 29, 2015 14:20
CompressionOfEnronCorpusWithRocksDB
# Download the Enron mongodb formatted corpus - see http://mongodb-enron-email.s3-website-us-east-1.amazonaws.com/
wget https://s3.amazonaws.com/mongodb-enron-email/enron_mongo.tar.bz2
# Uncompress the file whilst keeping the original bz2 file
bzip2 -dk enron_mongo.tar.bz2
tar xvf enron_mongo.tar
rm enron_mongo.tar
# At this point, you should spin up your MongoD instance - I used the instructions at http://blog.parse.com/announcements/mongodb-rocksdb-parse/ to start MongoDB with a RocksDB storage engine
ssh ubuntu@n.n.n.n "bash -s -x" -- <ixgbevf-upgrade.sh
@braz
braz / gist:4329660ba88459e92076
Last active August 29, 2015 14:26 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing

The purpose of this "howto" is to document how browsing can be done in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the "How to Contribute" section for information on contributing your own knowledge.

Table of Contents