Skip to content

Instantly share code, notes, and snippets.

View next2you's full-sized avatar

Christian van der Leeden next2you

  • Scoreloop AG
  • Munich, Germany
View GitHub Profile
@next2you
next2you / gist:1922588
Created February 27, 2012 08:33
Check all gem files if they are readable
#!/usr/bin/env ruby
require 'rubygems/format'
require 'thread'
queue = Queue.new
Dir["gems/*.gem"].sort.each do |gem|
#puts "Processing #{gem}"
@next2you
next2you / test_membase_flags.rb
Created February 21, 2011 21:54
Test to see if membase flags are set correctly after restoring
client = Dalli::Client.new( 'localhost:11222')
if ARGV.include?("-ro")
result = client.get("hello")
puts "Result #{result.class}"
puts "Result #{result} "
exit 0
end
client.set("hello", { :this => :is, :a => :new, :world => :yes } )
@next2you
next2you / Postgres Index Usage.sql
Created October 15, 2010 20:12 — forked from sriedel/Postgres Index Usage
Postgres: Determine table/index size
SELECT idx.relname as table,
idx.indexrelname as index,
pg_relation_size( idx.indexrelname::text )/1024/1024 as bytes,
cls.relpages as pages,
cls.reltuples as tuples,
idx.idx_scan as scanned,
idx.idx_tup_read as read,
idx.idx_tup_fetch as fetched
FROM pg_stat_user_indexes idx,
pg_class cls ,
# Change the default branch (which is used after git clone your-repo) to branch develop
# Be sure to run this on the remote repository, this cannot be pushed (as far as I know)
git symbolic-ref HEAD refs/heads/develop
# don't forget to delete master afterwards
git branch -d master
# or if you want to do it remote
git push origin :master
@next2you
next2you / gist:549210
Created August 25, 2010 09:55
dot files for git shell
# prerequisite:
# mkdir -p ~/Library/init; cd ~/Library/init; git clone http://github.com/marcoow/dotfiles.git
source ~/Library/init/dotfiles/.bash_completion.d/git-completion.bash
export PS1='\[\033[1;39m\]\u@\W$(__git_ps1 " [\[\033[1;34m\]%s\[\033[1;39m\]]") > '
- content_for :javascript do
:plain
alert("Hello");