Skip to content

Instantly share code, notes, and snippets.

View negipo's full-sized avatar
😇
corpse

Yoshiteru Negishi negipo

😇
corpse
  • Tokyo
View GitHub Profile
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');
@negipo
negipo / 0.md
Created February 22, 2014 08:23

test

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
#!/usr/bin/env ruby
require 'bundler'
Bundler.require
def main
sources = sources(ARGV.shift)
targets = Magick::ImageList.new
sources.each do |source|
colors = []
#!/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
// ==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
// 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'));
});
});
// with dotjs
setInterval(function() {
$('.soundList__item').each(function(idx, item) {
if($(item).find('.soundTitle__info').length > 0) {
$(item).remove();
}
});
}, 2000);
@negipo
negipo / MV.coffee
Last active August 29, 2015 14:04
# 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)
// 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');
}