Skip to content

Instantly share code, notes, and snippets.

View webmat's full-sized avatar

Mathieu Martin webmat

View GitHub Profile
@jordansissel
jordansissel / gist:4646783
Created January 27, 2013 06:04
logstash 1.1.10.dev's new thread name identification for more easily identifying hot threads in logstash!
top - 06:03:09 up 99 days, 22:26, 1 user, load average: 0.17, 0.30, 0.27 [0/1910]
Tasks: 125 total, 0 running, 125 sleeping, 0 stopped, 0 zombie
Cpu(s): 17.6%us, 0.4%sy, 0.0%ni, 81.3%id, 0.7%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 16427956k total, 16333472k used, 94484k free, 16k buffers
Swap: 5859364k total, 36224k used, 5823140k free, 14660824k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27641 logstash 20 0 10.2g 287m 17m S 24 1.8 6:27.88 |worker.1
27643 logstash 20 0 10.2g 287m 17m S 24 1.8 6:28.57 |worker.2
27640 logstash 20 0 10.2g 287m 17m S 24 1.8 6:27.11 |worker.0
@bf4
bf4 / ruby_learning.md
Last active July 17, 2021 08:06
Some Ruby Learning Resources
@sferik
sferik / install-ruby-2.0.0.sh
Created November 5, 2012 02:28
Instructions to install on Ruby 2.0.0 on Mac OS X with homebrew
#!/usr/bin/env sh
brew update
brew install rbenv
brew install ruby-build
brew install openssl
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-preview1
@josevalim
josevalim / 0_README.md
Created September 13, 2012 21:52
Sinatra like routes in Rails controllers

Sinatra like routes in Rails controllers

A proof of concept of having Sinatra like routes inside your controllers.

How to use

Since the router is gone, feel free to remove config/routes.rb. Then add the file below to lib/action_controller/inline_routes.rb inside your app.

exports[key] = value for key, value of {
run : run
document : document
parse : parse
resolveSource : resolveSource
version : version
defaults : defaults
languages : languages
}
@ifandelse
ifandelse / amplify.js
Created March 20, 2012 16:34
amplify.js in an AMD Wrapper
/*!
* AmplifyJS 1.0.0 - Core, Store, Request
*
* Copyright 2011 appendTo LLC. (http://appendto.com/team)
* Dual licensed under the MIT or GPL licenses.
* http://appendto.com/open-source-licenses
*
* http://amplifyjs.com
*/
(function(root, doc, factory) {
@coreyhaines
coreyhaines / .rspec
Last active August 15, 2024 15:13
Active Record Spec Helper - Loading just active record
--colour
-I app
@karmi
karmi / .gitignore
Created March 16, 2012 16:09
Bootstrap, install and configure ElasticSearch with Chef Solo
.DS_Store
Gemfile.lock
*.pem
node.json
tmp/*
!tmp/.gitignore
@peternixey
peternixey / securing_rails_updates.md
Created March 5, 2012 13:10
How Homakov hacked GitHub and how to protect your application by Peter Nixey

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey


@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.