Skip to content

Instantly share code, notes, and snippets.

# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
# See evil packets in your logs.
#net.ipv4.conf.all.log_martians = 1
# Disable packet forwarding.
@jamesonjlee
jamesonjlee / config.rb
Created August 1, 2013 20:42
cleanest way of excluding sub-array in chef node attributes
default['mongodb']['sysconfig']['ulimit']['file_limit'] = 12345
default['mongodb']['sysconfig']['ENABLE_MONGODB'] = "yes"
default['mongodb']['sysconfig']['port'] = 27107
@jamesonjlee
jamesonjlee / commands.out
Last active December 23, 2015 14:09
I might be crazy
jameson@jameson-mbp:~/playground/alembic_testnig/alembic$ git log -1
commit 4e8854a41ff985cc4df682e8b3c282f7111f431c
Author: Mike Bayer <[email protected]>
Date: Sat Sep 14 12:08:32 2013 -0400
fix typo, also this is apparently not covered
jameson@jameson-mbp:~/playground/alembic_testnig/alembic$ git remote -v
origin https://bitbucket.org/zzzeek/alembic.git (fetch)
origin https://bitbucket.org/zzzeek/alembic.git (push)
jameson@jameson-mbp:~/playground/alembic_testnig/alembic$ git branch
@jamesonjlee
jamesonjlee / gist:11271979
Created April 24, 2014 22:40
dynamodb local setup
sudo apt-get install openjdk-7-jre-headless -y
cd /home/ubuntu/
mkdir -p dynamodb
cd dynamodb
wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest
tar -xvzf dynamodb_local_latest
rm dynamodb_local_latest
mv dynamodb_local_*/ dynamodb/
@jamesonjlee
jamesonjlee / local-pypi.conf
Last active August 29, 2015 14:00
sample local proxy of pypi using devpi
description "local proxy of pypi"
#
# https://pypi.python.org/pypi/dev-pi
#
start on (local-filesystems and runlevel [2345])
stop on runlevel [016]
setuid ubuntu
setgid ubuntu

Keybase proof

I hereby claim:

  • I am jamesonjlee on github.
  • I am jameson (https://keybase.io/jameson) on keybase.
  • I have a public key whose fingerprint is 55DC 5625 19AE 8109 63AB 8816 68FC 26BB A32A 8211

To claim this, I am signing this object:

@jamesonjlee
jamesonjlee / gist:0072a9068d820035bf81
Created July 30, 2014 19:58
timestamp can both be null and have a default
mysql> create table temp3 ( id int, bleh int default null default 1, tstamp timestamp null default CURRENT_TIMESTAMP );
Query OK, 0 rows affected (0.01 sec)
mysql> show create table temp3;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| temp3 | CREATE TABLE `temp3` (
`id` int(11) DEFAULT NULL,
`bleh` int(11) DEFAULT '1',
@jamesonjlee
jamesonjlee / run.sh
Last active January 11, 2020 22:53
running AWS Cloudwatch Monitor tool on CentOS6.5
yum install -y perl-CPAN
export PERL_MM_USE_DEFAULT=1
# setup default config
perl -MCPAN -e shell # make sure to exit
# need to wait here
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Bundle::CPAN")'
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "CPAN")'
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Bundle::LWP")'
@jamesonjlee
jamesonjlee / gist:be5091351cc6c31f34a6
Created November 22, 2014 11:48
always test in prod guys
irb(main):001:0> "CloudAMQP-#@name0*"
=> "CloudAMQP-*"
irb(main):002:0> @name = 'blue-chicken'
=> "blue-chicken"
irb(main):003:0> "CloudAMQP-#@name*"
=> "CloudAMQP-blue-chicken*"
irb(main):004:0> "CloudAMQP-#@name0*"
=> "CloudAMQP-*"
@jamesonjlee
jamesonjlee / lol.csv
Last active May 16, 2024 21:11
lol-ava
Date Beds Unit SqFt Price
2015-03-18T23:34:06.391084 1 1707 690 3544
2015-03-18T23:34:06.391084 1 1604 750 3565
2015-03-18T23:34:06.391084 1 1415 716 3450
2015-03-18T23:34:06.391084 1 603 714 3355
2015-03-18T23:34:06.391084 1 408 716 3162
2015-03-18T23:34:06.391084 1 513 716 3417
2015-03-18T23:34:06.391084 1 403 725 3255
2015-03-18T23:34:06.391084 1 1711 1004 4108
2015-03-18T23:34:06.391084 2 1704 855 4770