Skip to content

Instantly share code, notes, and snippets.

@ezkl
ezkl / keybase.md
Created May 24, 2017 16:41
keybase.md

Keybase proof

I hereby claim:

  • I am ezkl on github.
  • I am ezkl (https://keybase.io/ezkl) on keybase.
  • I have a public key ASCPwOcej5TxiXcuaSH0EJJHvOozAW-U_IKKQyZ6-JtEsQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ezkl on github.
  • I am ezkl (https://keybase.io/ezkl) on keybase.
  • I have a public key whose fingerprint is 91BF 46AE 245B 6C2D BE1D 4941 5DD5 6A61 906E 14CC

To claim this, I am signing this object:

@ezkl
ezkl / basic.sql
Created April 16, 2013 05:04 — forked from nesquena/basic.sql
/* How to calculate postgreSQL database size in disk ? */
SELECT pg_size_pretty(pg_database_size('thedbname'));
/* Calculate size of a table including or excluding the index */
SELECT pg_size_pretty(pg_total_relation_size('big_table'));
SELECT pg_size_pretty(pg_relation_size('big_table')); /* without index */
/* See indexes on a table with `\d tablename` */
@ezkl
ezkl / 0-readme.md
Created November 21, 2012 07:20 — forked from cicloid/0-readme.md
ruby-1.9.3-p327 cumulative performance patch.

Patched ruby 1.9.3-p327 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p327 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@ezkl
ezkl / heredoc.sh
Created November 17, 2012 02:36
Using HEREDOC in the shell
~ $ cat <<EOF > testest
heredoc> $RANDOM
heredoc> EOF
~ $ cat testest
15816
~ $
@ezkl
ezkl / 0-readme.md
Created July 26, 2012 12:58 — forked from joelmoss/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@ezkl
ezkl / chef_solo_bootstrap.sh
Created July 5, 2012 01:58 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
@ezkl
ezkl / server.rb
Created June 20, 2012 02:53
Form Post
require 'sinatra'
post '/' do
puts params
end
@ezkl
ezkl / Gemfile.lock
Created May 17, 2012 07:33
Gemfile.lock
PATH
remote: .
specs:
ronin-exploits (1.0.0.pre1)
data_paths (~> 0.3)
open_namespace (~> 0.3)
ronin (~> 1.4)
ronin-gen (~> 1.1)
ronin-support (~> 0.4)
ruby-yasm (~> 0.2)
@ezkl
ezkl / flashback_trojan_scan.sh
Created April 5, 2012 01:42
Poorly Written Flashback Trojan Scan
#!/usr/bin/env bash
browser_regex='Firefox|Chrome|Safari'
infected=0
shift
echo "============================="
echo "Scanning for Flashback Trojan"
echo "============================="
echo
shopt -s nullglob