Skip to content

Instantly share code, notes, and snippets.

View fumiyas's full-sized avatar
💭
> 突然の死 <

SATOH Fumiyasu fumiyas

💭
> 突然の死 <
View GitHub Profile
@sh2
sh2 / my.cnf
Created August 16, 2012 08:35
my.cnf for a windows laptop computer.
[mysqld]
console
## character set
character_set_server = utf8mb4
collation_server = utf8mb4_general_ci
## sql
sql_mode = TRADITIONAL
transaction_isolation = READ-COMMITTED
@saitoha
saitoha / gist:3415651
Created August 21, 2012 13:54
VT340 Sixel Graphics Example (for RLogin/tanasinn/mlterm)
curl www.quadrantem.com/~k_wizard/vimprtan/20120423vimperator3.png | pngtopnm | pnmscale -xsize 200 | pnmquant 256 | ppmtosixel | perl -p -e 's/^\x90/\x1bP/' | perl -p -e 's/\x9C/\x1b\\/'
@LadyNamedLaura
LadyNamedLaura / aasprintf.h
Created September 4, 2012 17:07
aasprintf: alloca based asprintf
#include <alloca.h>
#include <stdio.h>
#pragma once
/*
* (v)aasprintf macro:
* alloca based asprintf
*
* usage:
@sh2
sh2 / fio_summarize.pl
Created September 5, 2012 05:59
fio test/summarize script
#!/usr/bin/perl
use strict;
use warnings;
my (%sequential, %random);
my ($type, $blocksize, $ratio, $iodepth, $header);
while (my $line = <STDIN>) {
@dvdhrm
dvdhrm / tsm.h
Created September 19, 2012 11:28
TSM library as one file
/*
* TSM - Unicode Handling
*
* Copyright (c) 2011-2012 David Herrmann <[email protected]>
* Copyright (c) 2011 University of Tuebingen
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
@yoshikaw
yoshikaw / ansicolortable.zsh
Created September 20, 2012 03:35
ANSIカラーテーブルを確認するzsh関数
# show the color combinations {{{2
# http://www.linuxfocus.org/English/May2004/article335.shtml
function ansicolortable() {
local -A sgr; sgr=(0 Normal 1 Bright 4 Underline 5 Blink 7 Reverse)
local -A a; local -A screen_attr
while getopts 01457s arg; do
case "$arg" in
0|1|4|5|7) a+=($arg $sgr[$arg]);;
s) screen_attr=(0 d 1 b 4 u 5 B 7 r);;
*);;
@saitoha
saitoha / sixel.py
Created September 30, 2012 09:30
convert an image into VT320 sixel color graphics (depends on PIL)
#!/usr/bin/env python
import sys, termios, StringIO
import Image # PIL
class SixelConverter:
def __init__(self, image, f8bit = False):
if f8bit: # 8bit mode
@saitoha
saitoha / DA1.py
Created October 27, 2012 16:55
get DA1 report from terminal
#!/usr/bin/env python
import sys, os, termios, select
TIMEOUT=2
stdin_fileno = sys.stdin.fileno()
backup = termios.tcgetattr(stdin_fileno)
new = termios.tcgetattr(stdin_fileno)
new[3] = new[3] &~ (termios.ECHO | termios.ICANON)
@Shinpeim
Shinpeim / 000.md
Last active November 2, 2024 00:52
プロセスとかスレッドとかプロセス間通信とかについて書く場所

重要

サイズがあまりに大きくなってしまったので、gist ではなくて github 上で管理するようにしました。

https://github.com/Shinpeim/process-book

URL 変わっちゃうの申し訳ないんだけど、一覧性が高くなるのと pull req が受け取れるメリットのほうを取ります。せっかく読みにきてくれたのにひと手間かかっちゃってすみません。

この文書の目的

@koron
koron / jekyll-modify-20130404.diff
Last active December 15, 2015 06:39
手元のJekyllの修正 * DNSの逆引き禁止 * encoding指定の追加 * バイナリモードでの出力 * 生成所要時間の出力
diff --git a/bin/jekyll b/bin/jekyll
index 74cb99b..1f87449 100644
--- a/bin/jekyll
+++ b/bin/jekyll
@@ -250,7 +250,9 @@ if options['auto']
dw.add_observer do |*args|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
puts "[#{t}] regeneration: #{args.size} files changed"
- site.process
+ t = Time.now