Date: <% tp.date.now("YYYY-MM-DD") %> Time: <% tp.date.now("HH:mm") %> Who: Last modified date: <%+ tp.file.last_modified_date() %>
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'rails', '3.2.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
This file contains hidden or 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
for (NSString *familyName in [UIFont familyNames] ) | |
{ | |
NSLog(@"Family name: %@", familyName); | |
for (NSString *fontName in [UIFont fontNamesForFamilyName: | |
familyName]) | |
{ | |
NSLog(@" Font name: %@", fontName); | |
} | |
} |
This file contains hidden or 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
class MyController < UIViewController | |
stylesheet :my_controller | |
layout :root do | |
subview(UITextField, :field) | |
end | |
def shouldAutorotateToInterfaceOrientation(orientation) | |
autorotateToOrientation(orientation) | |
end |
This file contains hidden or 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
#!/usr/bin/ruby | |
# Example usage: ./rpi-lcd.sh --power=on | |
args = Hash[ ARGV.join(' ').scan(/--?([^=\s]+)(?:=(\S+))?/) ] | |
power = args["power"] | |
if power == "on" | |
%x(sudo bash -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power") | |
elsif power == "off" | |
%x(sudo bash -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power") | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
filename = "/Users/hyuan/Development/bin/tmp/tmp_slack_md.txt" | |
file = File.open(filename) | |
file_data = file.read | |
# Upper case title | |
re = /^#* .+/ | |
file_data.gsub!(re) { |match| "*#{match.upcase}*"} |
If you have found this link, then you know what this. I was fortunate to reach the founders on the Internet to ascertain ways in which those who of us who have working headset can still continue to use the device now that the servers have been deprovisioned.
First, if you do not have the latest client, I have secured the clients and hosted them on Mediafire here: