Skip to content

Instantly share code, notes, and snippets.

View kumichou's full-sized avatar

Eric Hankinson kumichou

  • Covered Insurance
  • Hiram, OH
  • 17:55 (UTC -04:00)
View GitHub Profile
@azbesthu
azbesthu / get-kernel-source.sh
Last active July 3, 2020 12:01
get kernel source for current rpi raspbian wheezy kernel
#!/bin/bash
REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep '* firmware as of' | head -n 1 | sed -e 's/\ \*\ firmware as of \(.*\)$/\1/'`
rm -rf rasp-tmp
mkdir -p rasp-tmp
mkdir -p rasp-tmp/linux
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/git_hash -O rasp-tmp/git_hash
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/Module.symvers -O rasp-tmp/Module.symvers
@BMorearty
BMorearty / gist:809775
Created February 3, 2011 16:59
How to reset the timezone after handling a request.
around_filter :set_time_zone
def set_time_zone
old_time_zone = Time.zone
Time.zone = current_user.time_zone if logged_in?
yield
ensure
Time.zone = old_time_zone
end