This file contains 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
# | |
# 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-* |
This file contains 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
----- 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 |
This file contains 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
function! s:EnableRelativeNumber() | |
set nonumber | |
set relativenumber | |
endfunction | |
function! s:DisableRelativeNumber() | |
set norelativenumber | |
set number | |
endfunction |
This file contains 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 prevents capistrano from hanging when executing long tasks | |
# /etc/ssh/sshd_config | |
TCPKeepAlive yes | |
ClientAliveInterval 15 | |
ClientAliveCountMax 5 | |
# Restart sshd |
This file contains 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
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 |
This file contains 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
/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 |
This file contains 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
# 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 |
This file contains 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
# 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 |
This file contains 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
/* Font face generator needed to IE family | |
* http://www.fontsquirrel.com/fontface/generator | |
*/ | |
@font-face { | |
font-family: 'Essays1743Italic'; | |
src: url('Essays1743-Italic.eot'); | |
src: local('☺'), url('Essays1743-Italic.ttf') format('truetype'); | |
} |
This file contains 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
<%# From pretty_flash by rpheath (improved by pacoguzman) %> | |
<% if flash.any? -%> | |
<script type="text/javascript"> | |
$(function() { | |
setTimeout(hideFlashes, 5000); | |
}); | |
var hideFlashes = function() { | |
$("[id^='flash_']").fadeOut(1500); |
NewerOlder