Skip to content

Instantly share code, notes, and snippets.

Avatar

TAKANO Mitsuhiro takano32

View GitHub Profile
@takano32
takano32 / muretweet.user.js
Created May 3, 2009 — forked from sorah/muretweet.user.js
xpath使わないヤツ
View muretweet.user.js
// ==UserScript==
// @name muReTweet
// @namespace muretweet
// @description
// @include http://twitter.com/*/statuses/*
// @include http://twitter.com/*/status/*
// ==/UserScript==
//ReTweet用URLの生成//////////////////
///////postの内容を取得
View gist:110928
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>takano32 subscriptions in Google Reader</title>
</head>
<body>
<outline title="Mac" text="Mac">
<outline text=":: Mac.EGOism.jp ::"
title=":: Mac.EGOism.jp ::" type="rss"
xmlUrl="http://feeds.feedburner.jp/MEJ" htmlUrl="http://mac.egoism.jp/nu"/>
View gist:112657
$ ruby -ve 'raise Exception.new, "fuga"'
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9]
-e:1: fuga (Exception)
View binary.c
#include <stdio.h>
int b(char* str) {
int r = 0;
char* p = str;
for(r = 0; *p; p++) {
r <<= 1;
r += *p - '0';
}
return r;
View gist:114070
#define R 5
#define G 6
#define B 7
#define S 2
#define WAIT 500
int inByte = 0;
int inSwitch;
bool r, g, b, blink, off;
View gist:115104
# -*- coding: utf-8 -*-
require 'rubygems'
require 'mechanize'
require 'pit'
config = Pit.get("twitter",
:require => {
"username_or_email" => "your twitter username or email",
View gist:119826
(defun twittering-update-status-with-region (start end)
"twittering-mode: update status with region"
(interactive "r")
(twittering-update-status-if-not-blank (buffer-substring start end)))
(defun my-twittering-update-status ()
"twittering-mode: my update status"
(interactive)
(if mark-active
(twittering-update-status-with-region (region-beginning) (region-end))
View thread.rb
#!/usr/bin/env ruby
$var = 0
puts "var: #{$var}"
a = Thread.start do; 5.times do
$var += 1
puts "a: #{$var}"
Thread.pass
end;end
@takano32
takano32 / gist:147039
Created Jul 14, 2009
Ruby on Arduino
View gist:147039
#define R 2
#define G 3
#define B 4
#define S 5
#define WAIT 500
int inByte = 0;
int inSwitch = HIGH;
bool r, g, b, blink, off;
View [BUG] @ test_rand.rb
TestRand#test_random_range: /home/takano/ruby/test/ruby/test_rand.rb:354: [BUG] Segmentation fault
ruby 1.9.2dev (2009-08-27 trunk 24680) [x86_64-linux]
-- control frame ----------
c:0017 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :rand
c:0016 p:0049 s:0058 b:0056 l:000047 d:000055 BLOCK /home/takano/ruby/test/ruby/test_rand.rb:354
c:0015 p:---- s:0053 b:0053 l:000052 d:000052 FINISH
c:0014 p:---- s:0051 b:0051 l:000050 d:000050 CFUNC :each
c:0013 p:0071 s:0048 b:0048 l:000047 d:000047 METHOD /home/takano/ruby/test/ruby/test_rand.rb:352
c:0012 p:0062 s:0043 b:0043 l:000042 d:000042 METHOD /home/takano/ruby/lib/minitest/unit.rb:458
You can’t perform that action at this time.