This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# poor man's intrusion detection. | |
# | |
# usage: | |
# | |
# (1) add website to git: | |
# ssh my-webserver | |
# cd web-root-folder | |
# git init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' | |
startup_message off | |
# open a split screen for git and vim | |
split | |
screen -t vim 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'sinatra' | |
group :development do | |
gem 'sinatra-contrib', :require => 'sinatra/reloader' | |
gem 'foreman' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby1.9 | |
class Class | |
def descendants | |
ObjectSpace.each_object(::Class).select {|klass| klass < self } | |
end | |
end | |
# Ruby pre-1.8.7: | |
class Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is an SQLite tutorial / cheat sheet by Kurt Schwehr, 2009 | |
-- Conventions: | |
-- All SQL keyworks are written UPPERCASE, other stuff lowercase | |
-- All SQLite commands start with a "." | |
-- Two dashes start a comment in SQL | |
/* Another style of comments */ | |
---------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "example usage of rake helper" | |
task :default do | |
Rake::Shell["ls -al"] | |
Rake::Log["usage of rake helper"] | |
end | |
module Rake | |
class Shell | |
def self.[](command) | |
output = %x[#{command}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# print URLs of google search results to stdout | |
# the name 'xgoogle' is a homage to Peteris Krumins' xgoogle | |
# | |
# dependencies: | |
# gem install nokogiri | |
# | |
# usage: | |
# xgoogle <searchquery> [<number-of-results> [<language>]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form name="example" enctype="text/plain" action="http://example.com/xmlrpc/" method="post"> | |
<input type="hidden" name='<?xml version' | |
value='"1.0"?><methodCall><methodName>stocks.buy</methodName><params><param><value><string>MSFT</string></value></param><param><value><double>26</double></value></param></params></methodCall>'> | |
</form> | |
<script>document.example.submit();</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name jQuery | |
// @namespace http://www.joanpiedra.com/jquery/greasemonkey | |
// @description Play nicely with jQuery and Greasemonkey | |
// @author Joan Piedra | |
// @homepage http://www.joanpiedra.com/jquery/greasemonkey | |
// @include * | |
// ==/UserScript== | |
var $; |