Skip to content

Instantly share code, notes, and snippets.

View agibralter's full-sized avatar
:shipit:

Aaron Gibralter agibralter

:shipit:
View GitHub Profile
@snuggs
snuggs / .tmux.conf
Last active August 22, 2024 14:22
IDE & TMUX Configuration
############################################################################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
# Cheatsheets:
# https://devhints.io/tmux
# `property not found` issue:
defaults: &defaults
mem_limit: 512M
address: localhost
bin_path: /usr/local/bin
ngram_len: 1
ngram_chars: "U+4E00..U+9FBB, U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3041, U+3043, U+3045, U+3047, U+3049, U+304B, U+304D, U+304F, U+3051, U+3053, U+3055, U+3057, U+3059, U+305B, U+305D, U+305F, U+3061, U+3063, U+3066, U+3068, U+306A..U+306F, U+3072, U+3075, U+3078, U+307B, U+307E..U+3083, U+3085, U+3087, U+3089..U+308E, U+3090..U+3093, U+30A1, U+30A3, U+30A5, U+30A7, U+30A9, U+30AD, U+30AF, U+30B3, U+30B5, U+30BB, U+30BD, U+30BF, U+30C1, U+30C3, U+30C4, U+30C6, U+30CA, U+30CB, U+30CD, U+30CE, U+30DE, U+30DF, U+30E1, U+30E2, U+30E3, U+30E5, U+30E7, U+30EE, U+30F0..U+30F3, U+30F5, U+30F6, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11
@agibralter
agibralter / oniguruma.rb
Created January 19, 2011 23:43
Using oniguruma for splitting strings...
# ¿á you think á eh?
# "스마트폰을 가지고 있나? "
#
# reg = ORegexp.new( 'р(уби.*)', 'i', 'utf8' )
# matches = reg.match("Text: Ехал Грека Через Реку")
#
# 5ms) SHOW TABLES
# Sphinx Querying: '스마트폰을 | 가지고 | 있나'
# Sphinx (0.001932s) Found results
@chriseppstein
chriseppstein / compass.rb
Created January 18, 2011 05:56
The compass configuration file at caring.com
if ENV['RAILS_ENV'] && !defined?(RAILS_ENV)
Object.const_set("RAILS_ENV", ENV['RAILS_ENV'])
end
# Require any additional compass plugins here.
require 'grid-coordinates'
require 'compass-fancybox-plugin'
require 'susy'
project_type = :rails
@rpavlik
rpavlik / fix_homebrew.rb
Created January 6, 2011 20:32 — forked from mxcl/install_homebrew.markdown
Fix permissions on /usr/local for Homebrew
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
@igrigorik
igrigorik / thread.patch
Created January 2, 2011 20:54
Fixes hanging fork processes god issue on 1.9.x
--- a/thread.c
+++ b/thread.c
@@ -391,12 +391,21 @@ thread_cleanup_func_before_exec(void th_ptr)
}
static void
-thread_cleanup_func(void th_ptr)
+thread_cleanup_func(void *th_ptr, int atfork)
{
rb_thread_t *th = th_ptr;
@jordansissel
jordansissel / 1 - Scope.md
Created December 25, 2010 00:33
RightScale Security problem - Regenerate your ssh keys if you have known ones.

I found all of my ubuntu 10.04 rightscale hosts had the same ssh key. The base image they use has one ssh host key that is never regenerated on instance creation, so effectively 100% of hosts are likely to have the same key for each system image.

RightScale has been notified and they are working on notification and fixes for customers.

The script in this gist will regenerate your keys if you have the ones I know of (on the ubuntu 10.04 rightscale image)

AMI: ami-7c16e315

# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar xvfz libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<link href="/stylesheets/pie.css" media="screen, projection" rel="stylesheet" type="text/css" />
<![endif]-->
@atmos
atmos / lojack-proxy.god.rb
Created November 13, 2010 03:05
god configs for camo.
God.watch do |w|
w.uid = "git"
w.gid = "git"
w.name = "camo"
w.pid_file = "/data/camo/tmp/camo.pid"
w.interval = 30.seconds
w.env = {
"PORT" => '8080',
"CAMO_KEY" => '0x24FEEDFACEDEADBEEFCAFE'