Skip to content

Instantly share code, notes, and snippets.

View a-yasui's full-sized avatar
🐆
にゃおす

Atushi Jun Yasui a-yasui

🐆
にゃおす
View GitHub Profile
@khakimov
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@msng
msng / gist:1736439
Created February 4, 2012 08:45
WordPress の個別記事にはてブと Google+ と Twitter と Facebook「いいね!」のボタンを出すサンプル
<!--
・できれば <body> タグの直後に置く
・日本語ボタンを出すなら en_US を ja_JP にする
・アプリケーションIDをつける場合は、xfbml=1 の後に
&appId=[Facebookで取得するアプリケーションID: https://developers.facebook.com/apps ]
をつける
-->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
@tessro
tessro / redis-server
Created December 16, 2009 14:20
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid