Skip to content

Instantly share code, notes, and snippets.

View cmckni3's full-sized avatar

Chris McKnight cmckni3

View GitHub Profile
@cmckni3
cmckni3 / rails_logrotate.conf
Created February 3, 2016 16:38
Rails 3 logrotate
/home/deploy/APPNAME/current/log/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}
@cmckni3
cmckni3 / symfony_god.rb
Created February 3, 2016 16:39
Godrb script for monitoring a beanstalk worker process
# my custom monitoring configuration for applications other than rails
# This monitors a PHP beanstalk worker process
# run in non-daemonized mode (so you can monitor it) with `god -c /path/to/mysql.god -D`
# run normally with `god -c /path/to/mysql.god`
# the workers will have a name like such beanstalk-worker-app_directory ie beanstalk-worker-development
# Settings for email notifications (optional)
God::Contacts::Email.defaults do |d|
@cmckni3
cmckni3 / angularjs.md
Last active February 24, 2016 00:29
Collection of interesting things
@cmckni3
cmckni3 / performance.md
Last active February 9, 2016 16:15
Check the performance of a query
mysqlslap -u root -p --concurrency=100 --iterations=20 --create-schema=database_name --query="select * from tablename where name = 'Something';"
@cmckni3
cmckni3 / keybase.md
Created May 17, 2016 19:52
Keybase proof

Keybase proof

I hereby claim:

  • I am cmckni3 on github.
  • I am cmckni3 (https://keybase.io/cmckni3) on keybase.
  • I have a public key whose fingerprint is DAF4 64C8 D086 86AB 9DD4 B687 08E4 6B1B 5A14 3970

To claim this, I am signing this object:

@cmckni3
cmckni3 / virtualbox-port-forward.sh
Last active January 22, 2017 00:13
My standard port forwards for VirtualBox
VBoxManage controlvm "default" natpf1 "mysql,tcp,127.0.0.1,3306,,3306"
VBoxManage controlvm "default" natpf1 "development server,tcp,127.0.0.1,3000,,3000"
VBoxManage controlvm "default" natpf1 "elasticsearch,tcp,127.0.0.1,9200,,9200"
VBoxManage controlvm "default" natpf1 "logstash-lumberjack,tcp,127.0.0.1,5000,,5000"
VBoxManage controlvm "default" natpf1 "kibana,tcp,127.0.0.1,5601,,5601"
VBoxManage controlvm "default" natpf1 "logstash-filebeat,tcp,127.0.0.1,5044,,5044"
VBoxManage controlvm "default" natpf1 "mongo,tcp,127.0.0.1,27017,,27017"
VBoxManage controlvm "default" natpf1 "redis,tcp,127.0.0.1,6379,,6379"
VBoxManage controlvm "default" natpf1 "statsd admin,tcp,127.0.0.1,8126,,8126"
VBoxManage controlvm "default" natpf1 "memsql,tcp,127.0.0.1,3307,,3307"
@cmckni3
cmckni3 / async-program.cs
Created September 16, 2016 18:34
Async C# program.cs
static int Main(string[] args)
{
AsyncContext.Run(() => MainAsync());
}
static async Task MainAsync()
{
...
}
@cmckni3
cmckni3 / work-imac-casks.sh
Last active September 26, 2016 16:02
Work stuff
alfred apache-directory-studio base beaker-electron bitbar caffeine charles cloud cocoapods-app docker-toolbox firefox flux github-desktop google-chrome google-chrome-canary gpgtools iterm2-borderless-padding java kaleidoscope mojibar nylas-n1 oclint reveal rstudio sequel-pro sourcetree sublime-text the-unarchiver transmit vagrant wasted yemuzip
@cmckni3
cmckni3 / emacs-notes.md
Created September 19, 2016 20:05
emacs notes

Ctrl-x Ctrl-c Close emacs

q or Ctrl-g Close window

Configuration file: ~/.emacs.d\init.el