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> | |
char c[80]; | |
int v['Z'-'A'] = {0}; | |
// 数値・値を解釈して取得 | |
int getval(char* p) | |
{ | |
char* q = p; |
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> | |
char c[80];int v[25];int G(char*p){char*q=p;int n=(int)strtol(p,&p,0);return q- | |
p?n:v[*p++-65];}int E(char*p){int n=G(p);for(;*p;){char o=*p++;int m=G(p);if(o | |
==43)n+=m;if(o==45)n-=m;if(o==42)n*=m;if(o==47)n/=m;if(o==60)n=n<=m;if(o==61)n= | |
n==m;if(o==62)n=n>=m;}return n;}P(){printf("OK\n* ");}int main(){P();for(;gets( | |
c);){c[1]-61||*c-63?v[*c-65]=E(c+2):printf("%d\n",E(c+2));P();}return 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
#!/bin/bash | |
# coding: utf-8 | |
function compress_hash() | |
{ | |
echo $2 | sed \ | |
-e 's/aaa*/A/g' \ | |
-e 's/abb*/B/g' \ | |
-e 's/acc*/C/g' \ | |
-e 's/add*/D/g' \ |
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/bash | |
# coding: utf-8 | |
# twitcast.sh by dyama | |
if [ -n "$1" ]; then | |
id=$(echo "$1" | sed 's|^.*/||g') | |
fname="${id}_$(date +'%F_%H-%M-%S').ts" | |
ffmpeg -i "http://twitcasting.tv/$id/metastream.m3u8" \ | |
-vcodec copy -acodec copy -f mpegts "$fname" | |
else |
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> | |
#define RAMSIZE 30000 | |
int main(int argc, char **argv) | |
{ | |
FILE *f; /* インストラクションポインタ */ | |
int *p; /* データポインタ */ | |
int b[RAMSIZE] = { 0 }; /* バッファ */ | |
char c; /* 文字 */ | |
int i; /* カウンタ */ |
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
# Windows (notepad) like keybinding for nano editor | |
# Modified by dyama, Original code written by zonuexe, | |
# license under GPLv3 or NYSL(0.9982) | |
# lastupdate: h261124 | |
# | |
# how to install | |
# a. rename and move this file to $HOME/.nanorc | |
# % mv nanorc.keybindings $HOME/.nanorc | |
# b. concatenate this file with tail of $HOME/.nanorc | |
# % cat nanorc.keybindings >> $HOME/.nanorc |
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/bash | |
for file in `find . -type f -name '*.md' | xargs -I{} basename {} | sed 's/\.md$//g'` | |
do | |
( | |
echo '<!--#include file="head.html" -->' | |
markdown $file.md | |
echo '<!--#include file="foot.html" -->' | |
) > $file.html | |
chmod 644 $file.html |
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
<head> | |
<script type="text/javascript"> | |
<!-- | |
// 2010/01/08 jbClock by dyama | |
// for Firefox, Opera and Google Chrome | |
var BgColor = '#F00000'; | |
var BaseColor = '#351309'; | |
var ActiveColor = '#FF470F'; |
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
<?php | |
// [gist id="ID" file="FILE"] | |
function gist_shortcode($atts) { | |
return sprintf( | |
'<script src="https://gist.github.com/%s.js%s"></script>', | |
$atts['id'], | |
$atts['file'] ? '?file=' . $atts['file'] : '' | |
); | |
} add_shortcode('gist','gist_shortcode'); |
NewerOlder