Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

miron miron

🏠
Working from home
View GitHub Profile
@miron
miron / config.rb
Created Mar 16, 2013
transparent raggle
View config.rb
$config = {
'config_dir' => Raggle::Path::find_home + '/.raggle',
'config_path' => '${config_dir}/config.rb',
'feed_list_path' => '${config_dir}/feeds.yaml',
'feed_cache_path' => '${config_dir}/feed_cache.store',
'theme_path' => '${config_dir}/theme.yaml',
'grab_log_path' => '${config_dir}/grab.log',
'cache_lock_path' => '${config_dir}/lock',
'web_ui_root_path' => Raggle::Path::find_web_ui_root,
'web_ui_log_path' => '${config_dir}/webrick.log',
View cheatsheet.md

OS X (built in)

Get status of dd if you don't know that you can do it with CTRL-T, or when there is no pgrep (rescue disk)
ps -e | awk '/awk/ {next} {if(/ dd/) print "kill -INFO", $1}' | sh
Encode and decode using Base64 representation
base64
repeat some text (default is y) infinetly and save it to a file
yes foo > bar.txt
sudo without password, uncomment this in etc/sudoers
# %wheel ALL=(ALL) NOPASSWD: ALL
dscl . append /Groups/wheel GroupMembership USERNAME

View contact-form.rb
# See blog post at http://vitobotta.com/sinatra-contact-form-jekyll/
%w(rubygems sinatra liquid active_support/secure_random resolv open-uri pony haml).each{ |g| require g }
APP_ROOT = File.join(File.dirname(__FILE__), '..')
set :root, APP_ROOT
set :views, File.join(APP_ROOT, "_layouts")
not_found do
You can’t perform that action at this time.