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
vec4 hsv_to_rgb(float h, float s, float v, float a) | |
{ | |
float c = v * s; | |
h = mod((h * 6.0), 6.0); | |
float x = c * (1.0 - abs(mod(h, 2.0) - 1.0)); | |
vec4 color; | |
if (0.0 <= h && h < 1.0) { | |
color = vec4(c, x, 0.0, a); | |
} else if (1.0 <= h && h < 2.0) { |
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 tcsh -f | |
set gif = $argv[1] | |
set loop = $argv[2] | |
set mp4 = $argv[3] | |
set framerate = $argv[4] | |
if($loop < 1) then | |
echo "loop must >0" | |
exit |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define DEBUG | |
typedef int VALUE; | |
typedef struct linkedList { | |
VALUE head; |
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
jQuery(function($){ | |
if(location.href.indexOf("http://www.lancers.jp/work/") === 0){ | |
var proposes = $("table.prof > tbody > tr > td.stats.propose"); | |
proposes.each(function(e){ | |
var $this = $(this); | |
if($this.children().length === 3){ | |
var current = $this.children()[1].innerText; | |
var t = $this.children()[2].innerText; | |
var r = /^\(募集 ([0-9]+)件\)$/; | |
var total = t.match(r)[1]; |
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 url = location.href; | |
if(/entry\/index\/?$/.test(url)){ | |
var s = $('.menu_count').text(); | |
if(s == "0000000" && typeof q === 'undefined'){ | |
console.log("reload"); | |
setTimeout(function(){ | |
location.href = location.href; | |
}, 5000); | |
}else{ | |
var list = []; |
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 | |
if ARGV.size < 3 | |
puts "usage: comnand [audio-file] [image-file] [out-file.mp4]" | |
else | |
`ffmpeg -i #{ARGV[0]} -loop 1 -i #{ARGV[1]} -vcodec libx264 -preset slow -crf 20 -threads 0 -shortest -ar 44100 #{ARGV[2]}` | |
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
import controlP5.*; | |
//import gifAnimation.GifMaker; | |
import java.awt.*; | |
ControlP5 cp5; | |
String filenameA = null; | |
String filenameB = null; | |
void setup(){ |
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
javascript:var e=document.getElementById("lyricBody");var html=e.innerHTML;var s=html.split(/[\n]/).join("")/*.split(/<br\/?>/).join("\n")*/;document.body.innerHTML=("<p>"+s+"</p>")+document.body.innerHTML; |
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
void setup(){ | |
size(600,600,P3D); | |
} | |
void draw(){ | |
background(0); | |
noStroke(); | |
fill(255); | |
text(frameRate,50,50); | |
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
#!/bin/sh | |
if [ $# -lt 1 ]; then | |
gotty -a 0.0.0.0 -p 9999 -w tmux | |
else | |
gotty -a $1 -p 9999 -w tmux | |
fi |