Skip to content

Instantly share code, notes, and snippets.

ほげえええええええええ
ほげ
gitgit
#!/usr/bin/env ruby
# -*- ruby -*-
#
# $Date$
# $Rev$
#
require 'cgi'
require 'digest/md5'
cgi = CGI.new("html3")
imagedata = cgi.params['imagedata'][0].read
// ==UserScript==
// @name Twitter Souce Changer
// @namespace http://oq.la/
// @description camouflage Twitter clients from web
// @include http://twitter.com/
// @include https://twitter.com/
// ==/UserScript==
$(document).ready(function(){
$('#source').remove();
$('#status').before('<select id="source" name="source">');
@oquno
oquno / lastfm_loved_playlist_maker.rb
Created July 5, 2009 08:32
Ruby script to search own mt-daapd library and make playlist file of loved tracks on Last.fm
# /usr/local/bin/ruby
require 'nokogiri'
require 'open-uri'
require 'sqlite3'
$user = 'oquno'
$playlist_path = 'favorites.m3u'
$api_key = 'APIKEY HERE'
$sqlite_path = 'songs3.db'
<?php
$user="SCREEN_NAME";
$pass="PASSWORD";
$log="friends.txt";
$host="http://".$user.":".$pass."@twitter.com/";
$list=array();
$page=1;
while(1){
$api=$host."statuses/friends/".$user.".xml?page=".$page;
$xml=simplexml_load_file($api);
<?php
$users = split("\n", file_get_contents('friends.txt'));
$yes = 0;
$no = 0;
foreach($users as $user)
{
$xml = simplexml_load_string(file_get_contents('http://search.twitter.com/search.atom?q=from%3A'.$user));
if($xml->entry)
{
$yes++;
require 'rubygems'
require 'mechanize'
require 'nokogiri'
require 'open-uri'
require 'kconv'
# original source -> http://d.hatena.ne.jp/gigi-net/20090919/1253370152
mixi_username ='MAIL' #mixiのログイン用メールアドレス
mixi_password ='PASS' #mixiのログイン用パスワード
twitter_username ='USER' #twitterユーザー名(メールアドレスは不可)
comment =' from twitter' #追加するフッタ(何も追加しない場合''にしてください)
@oquno
oquno / school.rb
Created November 26, 2009 19:01
mixi同級生の人増の増減調査用
#!/usr/local/bin/ruby -Ks
# _*_ coding: utf-8 _*_
require 'rubygems'
require 'mechanize'
require 'time'
MAIL = 'mixi_login_mail_address'
PASS = 'mixi_login_pass'
DIRECTORY = 'log_directory_path'
@oquno
oquno / gyazo.rb
Created December 1, 2009 19:28
for using gyazo through kuins proxy server
begin
http = Net::HTTP.new(HOST, 80)
http.open_timeout = 2
res = http.post(CGI,data,header)
rescue Timeout::Error
http = Net::HTTP.new(HOST, 80, proxy_addr = 'proxy.kuins.net', proxy_port = 8080)
http.open_timeout = 2
res = http.post(CGI,data,header)
end