Skip to content

Instantly share code, notes, and snippets.

View gouf's full-sized avatar
😇
I don't know how my life work with.

Go Furuya gouf

😇
I don't know how my life work with.
View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mungruby
mungruby / singleton_struct.rb
Created May 29, 2012 02:10
Avoiding redefining constant Struct::ClassName warnings
fields = [:switch, :sha_ind, :dtdm, :utdm, :ttdm, :actual]
def create_struct name, fields
Struct.new(name, *fields)
end
def create_singleton_struct name, fields
if Struct::const_defined? name
Struct.const_get name
else
@matsubo
matsubo / credit_card_bin_codes.md
Last active March 8, 2024 04:14
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。

@hyamamoto
hyamamoto / vimdiff.md
Created December 4, 2013 08:16
The vimdiff cheat sheet as a git mergetool.

vimdiff cheat sheet

This is a vimdiff cheat sheet as a git mergetool.

Commands

]c - go to next difference 
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@kobaatsu
kobaatsu / pref.csv
Last active August 5, 2022 07:22
都道府県一覧 #utils
北海道 HOKKAIDO hokkaido
青森県 AOMORI aomori
岩手県 IWATE iwate
宮城県 MIYAGI miyagi
秋田県 AKITA akita
山形県 YAMAGATA yamagata
福島県 FUKUSHIMA fukushima
茨城県 IBARAKI ibaraki
栃木県 TOCHIGI tochigi
群馬県 GUNMA gunma
@miya0001
miya0001 / example.com.conf
Created October 14, 2011 08:44
nginx+リバースプロキシでバーチャルホスト
#
# A virtual host using WordPress
# /etc/nginx/conf.d/example.com.conf
#
server
{
listen 8080;
client_max_body_size 10m;
server_name .example.com;
@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
@linjunpop
linjunpop / README.md
Created August 21, 2012 01:15
Rails flash messages with AJAX requests