Skip to content

Instantly share code, notes, and snippets.

@Embedded-linux
Embedded-linux / debug
Created July 1, 2014 12:34
qemu-debug
Qemu Running:
qemu-system-arm -M versatilepb -kernel linux-3.2/arch/arm/boot/zImage -initrd initramfs -append "console=tty1"
##qemu-system-arm -M versatilepb -m 128M -kernel /home/satishg/qemu/zImage -initrd rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
versatile-Pb uImage:
qemu-system-arm -M versatilepb -m 128M -kernel /home/satishg/qemu/vers-uimage/zImage -initrd rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
For Debug:
qemu-system-arm -s -S -M versatilepb -m 128M -kernel /home/satishg/qemu/debug-image/zImage -initrd /home/satishg/qemu/debug/busybox-1.17.1/rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active March 12, 2025 18:03
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@localshred
localshred / deploy.rb
Created February 4, 2010 23:03 — forked from richievos/bundler_cap.rb
Using Bundler 0.9.1 with Capistrano
# ...
namespace :bundler do
task :create_symlink, :roles => :app do
shared_dir = File.join(shared_path, 'bundle')
release_dir = File.join(current_release, '.bundle')
run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}")
end
task :bundle_new_release, :roles => :app do
@henrik
henrik / .bashrc
Created December 3, 2008 17:56
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"