Skip to content

Instantly share code, notes, and snippets.

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

SATOH Fumiyasu fumiyas

💭
> 突然の死 <
View GitHub Profile
@hamano
hamano / README.md
Last active April 9, 2024 09:38
unzip 6.0 日本語化パッチ(Shift_JISファイル名などに対応)
@hotchpotch
hotchpotch / cocproxy.nginx.conf
Created May 25, 2011 04:50
cocproxy for nginx
#!nginx -p . -c cocproxy.nginx.conf
error_log /dev/stderr debug;
daemon off;
events {
worker_connections 48;
}
http {
@arika
arika / unzip.rb
Created June 8, 2011 00:14
expand zip-files (with pathname encoding conversion) <http://arika.org/2011/06/07/unzip-rb>
#!/usr/bin/ruby1.9.1
# encoding: UTF-8
=begin
Copyright (c) 2011, akira yamada
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
@yuya-takeyama
yuya-takeyama / marker_spec_01.rb
Created June 26, 2011 18:40
RSpec の書き方, メソッド単位に describe で分割するパターンと, オブジェクトの状態単位に context で分割するパターンとあると思う.
# メソッド単位に describe で分割するパターン
require 'spec_helper'
module Codebreaker
describe Marker do
let(:secret) { '1234' }
describe '#exact_match_count' do
subject { Marker.new(secret, guess).exact_match_count }
@helloluis
helloluis / Slim HTML5 Boilerplate Conditional Comments
Created August 31, 2011 08:52
How to get HTML5 Boilerplate-style Conditional Comments Working in Slim
doctype html
/[if lt IE 7]
| <html class="ie6">
/[if IE 7]
| <html class="ie7">
/[if IE 8]
| <html class="ie8">
/[if IE 9]
| <html class="ie9">
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]-->
@laiso
laiso / gist:1217214
Last active October 29, 2020 18:18
[日記] 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
# 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
何ッ ()
もしも それ が 真実 なの ならば———
これ は 大変なことになるぞ! (いや?)\
まぁ…… いい…
ククク…… 見せてもらおうじゃないか…… ←\
旋律 の 傀儡師 の 実力とやらを! # TODO なぜだ!? 動く!?
@rblackwe
rblackwe / gist:1342982
Created November 6, 2011 14:51 — forked from briandfoy/gist:1342877
Perl regex escapes by version of their introduction
# compiled by Tom Christiansen
v1.0 \0, \0N,\0NN Match octal character up to octal 077.
v1.0 \N, \NN, \NNN Match Nth capture group (decimal) if not in charclass and that many seen, else (octal) character up to octal 377.
v4.0 \a Match the alert character (ALERT, BEL).
v5.0 \A True at the beginning of a string only, not in charclass.
v1.0 \b Match the backspace char (BACKSPACE, BS) in charclass only.
v1.0 \b True at Unicode word boundary, outside of charclass only.
v1.0 \B True when not at Unicode word boundary, not in charclass.
v4.0 \cX Match ASCII control character Control-X (\cZ, \c[, \c?, etc).
v5.6 \C Match one byte (C char) even in UTF‑8 (dangerous!), not in charclass.
@waltarix
waltarix / zsh-ambiguous-width-cjk.patch
Last active December 5, 2015 05:36
zsh: Fix Ambiguous-width CJK treating problem.
diff --git a/Src/compat.c b/Src/compat.c
index 9041c0b..4d2b320 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -860,6 +860,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
return width;
}
+#endif /* 0 */
@saitoha
saitoha / drcsconv.pl
Created June 20, 2012 13:45
Convert image file to VT-320's DRCS format.
#!/usr/bin/env perl
use strict;
use warnings;
if ($#ARGV != 0) {
print "ussage: drcsconv.pl <filename>.";
exit 0;
}
my $file = $ARGV[0];
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: