Skip to content

Instantly share code, notes, and snippets.

system "yes | /usr/bin/wine /home/ssig33/local/share/ffmpeg.exe -i \"#{f}\" -s #{width}x272 -vcodec libx264 -b 600k -acodec libfaac -ac 2 -ar 48000 -ab 128k -async 100 -f mp4 -coder 0 -level 13 -threads 0 \"#{tmp}\"
#!/usr/bin/env ruby
#coding:utf-8
require 'mechanize'
alice = Mechanize.new
page = alice.get ARGV[0]
url = CGI.unescape page.root.xpath('//*[@id="flash-player-embed"]')[0]['flashvars'].split('&flv_url=').last.split('&').first
title = page.root.xpath('//td/strong')[0].inner_text.gsub(/\//, '/')+'.flv'
// ==UserScript==
// @name miil mazusou
// @namespace http://ssig33.com
// @description miil mazusou ni suru
// @include http://miil.me/p/*
// ==/UserScript==
(function() {
window.onload = function() {
var img, over, _i, _len, _ref;
// ==UserScript==
// @name mazusou na cookpad
// @namespace http://ssig33.com
// @description cookpad ga mazusou ninaru
// @include http://cookpad.com/*
// ==/UserScript==
(function() {
window.onload = function() {
var img, _i, _len, _ref, _results;
_ref = document.querySelectorAll('img');
require 'RMagick'
blob = open(ARGV[0]).read
img = Magick::Image.from_blob(blob).first
img = img.modulate(0.8, 0.75, 1.2)
open(ARGV[1], 'wb'){|x| x.puts img.to_blob}
@ssig33
ssig33 / negaproxy.rb
Created February 1, 2012 06:46 — forked from hitode909/negaproxy.rb
画像の色を反転させるプロキシ
#!/usr/bin/env ruby
require 'webrick'
require 'webrick/httpproxy'
require 'RMagick'
handler = Proc.new() { |req,res|
if res['content-type'] =~ /image/
begin
img = Magick::Image.from_blob(res.body).first
require 'zipruby'
require 'RMagick'
Zip::Archive.open(ARGV[0]){|as|
as.each_with_index{|a, i|
ft = a.name.split('.').last
if ft == 'jpeg' or ft == 'png'
file = a.read
m = Magick::Image.from_blob(file).first
m.trim!
r = m.resize_to_fit(560, 734)
#!/usr/bin/env ruby
#coding:utf-8
require 'mechanize'
require 'xmlsimple'
video_ids = ARGV
mail = ''
password = ''
alice = Mechanize.new
(function() {
$(function() {
var img;
if (location.href.match(/watch/)) {
img = $('<img>');
img.attr({
src: 'http://nico.ssig33.com/api?url=' + encodeURIComponent(location.href)
});
console.log(img);
set-option -g default-terminal screen-256color
set-option -g prefix C-f
set-option -g history-limit 10000
set-window-option -g mode-key vi
set-option -g status-left "x-F"
set-option -g status-right "#(date +'%Y/%m/%d %H:%M:%S')"
set-option -g status-interval 1
set-window-option -g utf8 on