Skip to content

Instantly share code, notes, and snippets.

@garaemon
garaemon / collada_parser.diff
Created December 20, 2012 04:49
collada_parser.cpp
117a118,128
> /// \brief bindings for links between different spaces
> class LinkBinding
> {
> public:
> domNodeRef node;
> domLinkRef domlink;
> domInstance_rigid_bodyRef irigidbody;
> domRigid_bodyRef rigidbody;
> domNodeRef nodephysicsoffset;
@garaemon
garaemon / gist:4435160
Last active July 25, 2017 09:03
フリーノート歌詞聴きとってみた ひめキュンフルーツ缶
聴きとってみた
一部わからず
授業中、じゃれあう姿想像して
帰り道ささいなことで喧嘩して
どうして人はすれ違うようになってる
ごめんねって一言も素直に出てこない
あなたが思う大事なこと、私が思う大切なこと
function hoge(next) {
fuga(function(err, piyo) {
if (err != null) {
next(err);
}
else {
...
}
});
}
@garaemon
garaemon / gist:5635012
Created May 23, 2013 09:53
test fortran
program helloworld
print *, "Hello, world."
end program helloworld
@garaemon
garaemon / Makefile
Created May 23, 2013 10:51
for @shibu_tan_i
all: hello lesson1 lesson2_a lesson2_b lesson3
hello: hello.f90
gfortran $< -o $@
lesson1: lesson1.f90
gfortran $< -o $@
lesson2_a: lesson2_a.f90
gfortran $< -o $@
lesson2_b: lesson2_b.f90
@garaemon
garaemon / ust.js
Created May 24, 2013 10:49
ustのページからffmpegでごにょごにょするコマンドを抽出するbookmarklet
var url = $('meta[property="og:video"]').attr("content");
var parser = document.createElement('a');
parser.href = url;
var cid = parser.search.match(/cid=([0-9a-zA-Z]+)/)[1];
alert("ffmpeg -re -i http://iphone-streaming.ustream.tv/uhls/" + cid + "/streams/live/iphone/playlist.m3u8 -c copy out.ts")
InteractiveTestRecord.find().exec(function(err, records) {
console.log(records);
});
@garaemon
garaemon / git.md
Last active August 29, 2015 13:56
git and github introduction and tips

git and github introduction and tips

gitでユーザー名を設定する

git config --global user.name hoge
git config --global user.email [email protected]

gitで他人のforkを手元に反映させる

@garaemon
garaemon / sample.js
Created March 13, 2014 12:32
rosnodejs sample

How to run

mkdir foo
cd foo
npm install git+https://github.com/baalexander/rosnodejs.git
node sample.js

verify it

@garaemon
garaemon / update_tags.sh
Last active August 29, 2015 13:57
a script to fix tags of jsk repos
#!/bin/bash
TAGS="cturtle diamondback fuerte electric"
for tag in $TAGS
do
if [ `git tag -l $tag` ]; then
hash=$(git log -1 --format="%H" --until="$(git show $tag --pretty=%ci -s | tail -n 1)")
if [ "$hash" != "" ]; then
echo "$tag -> $hash"