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
uid = ((Math.random() * 10000)|0) + | |
'-' + Date.now() + | |
'-' + ((Math.random() * 10000)|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
tween = ($from, $to, therefore) -> | |
$a = $from.clone() | |
$from.css(opacity: 0.75) | |
$a.css(position: 'absolute') | |
.css($from.offset()) | |
.css('border-color', 'transparent') | |
$from.parent().append $a | |
$a.animate $to.position(), | |
complete: -> | |
$a.remove() |
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
$q = http_build_query($_REQUEST); | |
header("Location: foo.php?$q"); |
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
# adduser foo | |
# passwd foo | |
# visudo |
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
sudo php /usr/lib/php/install-pear-nozlib.phar | |
sudo pear install PHP_CodeSniffer | |
cd /usr/lib/php/pear/PHP/CodeSniffer/Standards | |
sudo mv ~/git/PHPCompatibility . | |
sudo cp php.ini.default php.ini | |
sudo vi php.ini # add /usr/lib/php/pear to include_path | |
phpcs --standard=PHPCompatibility a.php |
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
cd foo # .git があって github で管理しているところ | |
git remote add a /bar # ローカルな .git があるところ | |
git subtree add --prefix=bar a master | |
git push | |
git remote rm a |
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
a;main(){int b=++a+a,c=b+b,d=c+c,e=d+d,f=e+e,g=f+f,h=g+f+c,i=d+b+a,j=g+d;char s[]={j,h+a,h+d,h+d,h+i,f,j+e-a,h+i,h+e-b,h+d,h,b+d,--a};puts(s);} |
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
git checkout gh-pages | |
git merge master | |
git push origin gh-pages | |
Add the following 2 lines to the [remote "origin"] section of .git/config: | |
push = +refs/heads/master:refs/heads/gh-pages | |
push = +refs/heads/master:refs/heads/master |
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
cd /src_repo | |
git subtree split -P path/to/folder -b PathToFolder_branch | |
cd /dst_repo | |
git pull /src_repo PathToFolder_branch | |
git push | |
cd /src_repo | |
git branch -D PathToFolder_branch |
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 <ctype.h> | |
typedef unsigned char BYTE; | |
typedef int INT4; | |
int main() | |
{ | |
BYTE pngHdr[8]; | |
BYTE buf4[4]; |