Skip to content

Instantly share code, notes, and snippets.

package main
// from http://www.darul.io/post/2015-07-22_go-lang-simple-reverse-proxy
import (
"net/http"
"net/url"
"net/http/httputil"
"flag"
"fmt"

C++11の文法と機能(C++11: Syntax and Feature)

Copyright (C) 2013 江添亮.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".

suits = %w| ⚫️ ⚪️ 🔴 🔵|.reverse
suits = %w|♦️ ️♣ ️♥️ ♠️|.reverse
nums = ["A"] + (2..9).to_a + %w|* J Q K|
cards = suits.map {|s| nums.collect {|i| "%s %s " % [i, s]}.reverse}.flatten
# cards = (1..52).map {|i| "%02d " % i}
puts cards.length
puts cards.join("|")
@akkijp
akkijp / install-php-7.0.6.sh
Created May 3, 2016 21:53
php7 installation. Dose not work this script!
#!/bin/bash
set -x
set -e
if [ ! -x "`which php`" ]; then
if [ ! -e ./php-7.0.6 ]; then
wget -O "php-7.0.6.tar.gz" http://jp2.php.net/get/php-7.0.6.tar.gz/from/this/mirror && \
tar xfvz ./php-7.0.6.tar.gz
fi
@akkijp
akkijp / README.md
Last active May 4, 2016 12:12
NeoBundle installation

Installation

Just run this...

curl https://gist.githubusercontent.com/k4zzk/ddbf5839e3384571b1b9a717f08eaf83/raw/489867fc31a5138328bc5e5801cf945e28982498/install_neobundle.sh | sh && \
vim "+NeoBundleInstall"
@akkijp
akkijp / pip-upgrade-all.zsh
Last active April 14, 2016 12:39
pip pip3 関連のパッケージを一括アップグレードするスクリプト
alias pip-upgrade-all="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U"
alias pip3-upgrade-all"pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip3 install -U"
@akkijp
akkijp / delete-heroku-apps.sh
Created April 10, 2016 11:30 — forked from naaman/delete-heroku-apps.sh
Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done
@akkijp
akkijp / gemlist.txt
Created April 5, 2016 05:41
自分のコンピュータにインストールされていた、gemリストと、既存のgemを全アンインストールするスクリプト
actionmailer (4.2.4, 4.2.2)
actionpack (4.2.4, 4.2.2, 4.2.1)
actionview (4.2.4, 4.2.2, 4.2.1)
activejob (4.2.4, 4.2.2)
activemodel (4.2.4, 4.2.2, 4.2.1)
activerecord (4.2.4, 4.2.2)
activesupport (4.2.4, 4.2.2, 4.2.1)
addressable (2.3.8)
arel (6.0.3)
ast (2.2.0, 2.1.0)
@akkijp
akkijp / build.sh
Last active April 5, 2016 05:43
OpneCVをビルドした時のエラーログと、ビルドに成功した時のコマンド
#!/bin/sh
g++ `pkg-config --cflags opencv` -lopencv_core -lopencv_highgui -lopencv_imgproc version_cv.cpp `pkg-config --libs opencv`