Skip to content

Instantly share code, notes, and snippets.

{
"Monday": [
[
"00:00",
"07:00"
],
[
"17:00",
"24:00"
]
@ernest-ns
ernest-ns / raspberrypi_interfaces
Created December 14, 2013 08:32
I was trying to connect my Edimax Wifi dongle to my raspberrypi. The gist is the short summary how I connected Edimax to the router
# I was trying to connect my Edimax Wifi dongle to my raspberrypi
# I tried configuring it using the following llink
# http://www.savagehomeautomation.com/projects/raspberry-pi-installing-the-edimax-ew-7811un-usb-wifi-adapte.html
# but Edimax would not connect to my router
# after refering to the following link
# http://www.cyberciti.biz/faq/debian-linux-wpa-wpa2-wireless-wifi-networking/
# I was able to connect make the raspberrypi connect to the router.
# this is how my /etc/network/interfaces looks like on my raspberrypi

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@ernest-ns
ernest-ns / smokers.rb
Created May 31, 2012 12:28
Go for a smoke?
class Smokers < ActiveRecord:: Base
belongs_to :heart_failure_statistics
has_many :cigarettes
attr_accessor :mins_since_last_puff
before_validation :check_cigarettes
def smoke?
if mins_since_last_puff >= 60
print("Smoke?")