Skip to content

Instantly share code, notes, and snippets.

View K-atc's full-sized avatar
:octocat:
Octocatic Days

K_atc K-atc

:octocat:
Octocatic Days
View GitHub Profile
@K-atc
K-atc / CJK.xelatex
Last active April 19, 2016 01:52
Texts カスタマイズ関連ファイル
\documentclass[11pt]{article}
% \documentclass[a4paper]{bxjsarticle} % 文書クラスは bxjsarticle
\usepackage[default]{zxjatype} % zxjatype パッケージ読込
\usepackage[utf8]{inputenc}
\usepackage{fontspec, xunicode}
% \usepackage{mathspec}
\usepackage{coloremoji}
@K-atc
K-atc / Readme.md
Last active August 29, 2015 14:18
Tweetするブックマークレット

Install

javascript:(function(){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(document.title+"\n")+location.href,"Tweet","width=550,height=420");})();

をブックマークのURLとして登録。

Usage

@K-atc
K-atc / Readme.md
Last active August 29, 2015 14:18
Windows 時刻合わせバッチ

What is this?

NTPが使えない環境のための時刻合わせバッチファイル(スクリプト)

Requirements

  • 実行時に管理者権限
  • Python
  • requestsモジュール(pip install requests)
  • インターネット
@K-atc
K-atc / Preferences.sublime-settings
Created April 9, 2015 15:40
Sublime Text 3 User Settings
{
"binary_file_patterns":
[
"*.tga",
"*.dds",
"*.ico",
"*.eot",
"*.pdf",
"*.psd",
"*.swf",
@K-atc
K-atc / Main.c
Last active August 29, 2015 14:19
#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);
@K-atc
K-atc / bg-job.rb
Created May 17, 2015 14:46
特定のタスクをバックグラウンド実行し、好きなタイミングで終了するRubyスクリプト
# 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
@K-atc
K-atc / rot13.py
Created July 4, 2015 09:59
ROT13
# -*- 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]
@K-atc
K-atc / onion_base64decode.py
Created July 4, 2015 16:48
onion Base64 decode
# -*- 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')
@K-atc
K-atc / uudecode.py
Created July 4, 2015 16:48
uudecode
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)
@K-atc
K-atc / tateyomi.py
Created July 4, 2015 21:18
縦読み
# 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: