pacman -S wvdial usb_modeswitch
reboot
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'pp' | |
require "active_record" | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.colorize_logging = true |
UPDATE: Seems to be fixed. | |
With the commit at http://github.com/carz2/cm-kernel/commit/e337c700209ae09ce80e60d7e3c5306b57a9f709 | |
My phone now charges properly while plugged in. | |
The value in /sys/class/power_supply/battery/charging_enabled has changed to 1. | |
============================================================================= | |
Problems with the kernel for HTC magics with the 6.35 radio | |
Kernel used is a compile of http://github.com/carz2/cm-kernel |
require 'rubygems' | |
require 'net/http' | |
require 'nokogiri' | |
require 'time' | |
Auth = 'YOUR AUTH KEY' | |
def unread_items | |
headers = {'Authorization' => "GoogleLogin auth=#{Auth}" } |
#!/usr/bin/env ruby | |
require 'socket' | |
require 'uri' | |
class MinecraftIrcBot | |
def initialize(options) | |
uri = URI.parse("irc://#{options[:server]}") | |
@channel = options[:channel] | |
@socket = TCPSocket.open(uri.host, uri.port || 6667) |
class PaperclipInterpolator | |
def initialize pattern | |
@pattern = pattern | |
@methods = [] | |
@template = Paperclip::Interpolations::all.reverse.inject( pattern.dup ) do |result, tag| | |
result.gsub(/:#{tag}/) do |match| | |
@methods << tag.to_sym | |
"%{#{tag}}" | |
end | |
end |
pacman -S wvdial usb_modeswitch
reboot
/* | |
* gotoh.c | |
* Compute a sequence alignment with an affine gap cost | |
*/ | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <float.h> |
require 'json' | |
require 'open-uri' | |
TIMELINE_URL = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=Cmdr_Hadfield&include_entities=true&trim_user=true&exclude_replies=true' | |
class Tweet < Struct.new(:tweet) | |
def media | |
tweet['entities']['media'][0] | |
end | |
def image_url |
/* humans.c | |
* $ gcc -o humans humans.c | |
* $ ./humans & | |
* $ killall humans | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <signal.h> |
class Spreadsheet | |
def initialize | |
@hash = Hash.new(0) | |
end | |
class Subset < Struct.new(:spreadsheet, :row, :col) | |
def [] k | |
return k.map{|x| self[x]} if k.respond_to? :map | |
spreadsheet[cell k] | |
end | |
def []= k, v |