This file contains hidden or 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> | |
int main() { | |
char *p; | |
unsigned long i = 1073741824; | |
// 文字列変数に1GB(1073741824 B)のメモリを確保し続ける | |
// メモリを確保できなくなるとmallocはnullを返すため、nullが返されるまで繰り返す | |
do { |
This file contains hidden or 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
ruby -e loop{} |
This file contains hidden or 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
% ruby -e 'while (1); end' |
This file contains hidden or 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/env ruby | |
#encoding:UTF-8 | |
require "twitter" | |
# アプリケーションキー(consumer key/secret)の読み込み | |
Twitter.configure do |cnf| | |
cnf.consumer_key = "XXXX" | |
cnf.consumer_secret = "XXXX" | |
end |
This file contains hidden or 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
$ jot 100 | awk '$1%3==0&&$1%15!=0{print "Fizz"} $1%5==0&&$1%15!=0{print "Buzz"} $1%15==0 {print "FizzBuzz"} $1%3!=0&&$1%5!=0{print $1 }' | tr ' ' '\n' |
NewerOlder