This file contains 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
var isDisplay = true; | |
$(document).keyup(function(e) { | |
if (e.keyCode == 27) { | |
isDisplay = !isDisplay; | |
if(isDisplay) { | |
$('#status, .avatars, .options, .postinfo, .controller, .sub').show(); | |
$('.sub').css('top', '210px'); | |
} else { | |
$('#status, .avatars, .options, .postinfo, .controller, .sub').hide(); | |
$('.sub').css('top', '-20000px'); |
This file contains 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
LOOP_COUNT = 50 | |
def main | |
`ffmpeg -i in.gif -f mp4 in.mp4` | |
`ffmpeg #{LOOP_COUNT.times.map { '-i in.mp4' }.join(' ')} -filter_complex "concat=n=#{LOOP_COUNT}:v=1:a=0" out.mp4` | |
end | |
main |
This file contains 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 | |
require 'bundler' | |
Bundler.require | |
def main | |
sources = sources(ARGV.shift) | |
targets = Magick::ImageList.new | |
sources.each do |source| | |
colors = [] |
This file contains 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 | |
LOOP_COUNT = 20 | |
def main | |
`ffmpeg -i #{ARGV.shift} -f mp4 in.mp4` | |
`ffmpeg #{LOOP_COUNT.times.map { '-i in.mp4' }.join(' ')} -filter_complex "concat=n=#{LOOP_COUNT}:v=1:a=0" out.mp4` | |
`rm in.mp4` | |
end |
This file contains 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
// ==UserScript== | |
// @name WikipediaRandomAutoPager | |
// @namespace http://polog.org/ | |
// @include http://*.wikipedia.org/wiki/* | |
// @require http://gist.github.com/3242.txt | |
// ==/UserScript== | |
// requires AutoPagerize http://userscripts.org/scripts/show/8551 by swdyh | |
// using utility $X() http://gist.github.com/3242 by os0x | |
// notice: put this script ABOVE AutoPagerize |
This file contains 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
// with dotjs | |
$('.tweet-btn').click(function() { | |
$('.tweet-box.rich-editor div').each(function() { | |
$(this).text($(this).text().replace(/[^.\/:!\?,@\s ]/g, function() { return ['p', 'o'][Math.floor(Math.random() * 2)]}, 'po')); | |
}); | |
}); |
This file contains 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
// with dotjs | |
setInterval(function() { | |
$('.soundList__item').each(function(idx, item) { | |
if($(item).find('.soundTitle__info').length > 0) { | |
$(item).remove(); | |
} | |
}); | |
}, 2000); |
This file contains 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
# http://hokaccha.github.io/slides/javascript_design_and_test/ の写経 | |
class Todo | |
@list: [] | |
@add: (text) -> | |
todo = new Todo(text: text) | |
Todo.list.push(todo) | |
@trigger('add', todo) |
This file contains 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
// based on https://github.com/r7kamura/amazon-url-modifier | |
var asinElement = $('#ASIN, input[name="idx.asin"], input[name="ASIN.0"]'); | |
if (asinElement.length > 0) { | |
window.history.pushState({}, '', '/dp/' + asinElement.val() + '/polog-22'); | |
} |
OlderNewer