- -p オプション必須
- プログラムは暫定的
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
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | |
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure | |
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
# -*- coding: utf-8 -*- | |
import sys | |
def binary_search(list, n): | |
imin = 0 | |
imax = len(list) | |
while True: | |
i = (imin + imax) / 2 | |
print "%d < %d < %d" % (imin, i, imax) | |
if list[i] == n: |
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
# coding: UTF-8 | |
import sys | |
if not(len(sys.argv) >= 2): | |
print "tateyomi: 縦読みしてくれるプログラム" | |
print "usage: python tateyomi.py <file> [<offset>]" | |
exit() | |
offset = 0 | |
if len(sys.argv) > 2: |
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
import uu | |
import sys | |
if not(len(sys.argv) >= 2): | |
print "uudecode: " | |
print "usage: python uudecode.py <file>" | |
exit() | |
uu.decode(sys.argv[1], sys.stdout) |
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
# -*- coding: utf-8 -*- | |
import sys | |
import base64 | |
if not(len(sys.argv) >= 3): | |
print "onion Base64 decoder: " | |
print "usage: python onion_base64decode.py <Base64 encoded file> <n>" | |
exit() | |
f = open(sys.argv[1], 'r') |
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
# -*- coding: utf-8 -*- | |
import sys | |
if not(len(sys.argv) >= 2): | |
print "ROT13: アルファベットを一文字毎に13文字後のアルファベットに置き換えるプログラム" | |
print "usage: python rot13.py <cipher-text file>/<plain-text file>" | |
exit() | |
filename = sys.argv[1] |
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
# coding: utf-8 | |
# $ cat ./hoge.sh | |
# #!/bin/bash | |
# while true; do | |
# date; sleep 1 | |
# done | |
cmd = "sh ./hoge.sh" | |
pid = Process.spawn cmd, STDOUT=>STDOUT |
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> | |
#define SHARP_OP_TEST(expr) (printf("#expr = %s, expr = %d\n", #expr, (expr)) ) | |
#define var(i) printf("var" #i " = %d\n" , var ## i) | |
#define CONBINE(a, b) (printf("%s\n", a##b)) | |
int main(void){ | |
const char test[] = "This is test"; | |
int var1 = 10; | |
SHARP_OP_TEST(1+2); |