Skip to content

Instantly share code, notes, and snippets.

View pocke's full-sized avatar
⌨️
Pocke is typing...

Masataka Pocke Kuwabara pocke

⌨️
Pocke is typing...
View GitHub Profile
@shkumagai
shkumagai / how_to_write_go_code.rst
Last active March 30, 2023 03:54
How to Write Go Code
@polamjag
polamjag / symlinker.sh
Created October 1, 2013 05:42
このシェルスクリプトが存在するディレクトリ内の dotfiles のシンボリックリンクをホームディレクトリに貼るスクリプト shell script to create symbolic link of "dotfiles" in which same directory with this script to your home directory. also handles directory whose name starts with dot.
#!/usr/bin/sh
# symlinker.sh
# shell script to create symbolic link of "dotfiles" in which same directory with this script to your home directory. also handles directory whose name starts with dot.
# NOTICE: this script processes only files whose name begin with . (dot)
#
# polamjag <[email protected]>
# license: public domain
echo -e "creating symbolic link of dotfiles..."
@steeve
steeve / _readme.md
Last active March 25, 2025 07:32
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@rhysd
rhysd / hoge.vim
Last active January 3, 2016 10:58
" カーソル位置の復元(git commit のときだけは動かさない)
augroup restore-cursor
autocmd!
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !=# 'gitcommit' |
\ exe "normal! g`\"" |
\ endif
augroup END
# RSpec matcher for alias_method.
# https://gist.github.com/1950961
# Usage:
#
# describe User do
# it { should alias_from(:username).to(:email) }
# end
RSpec::Matchers.define :alias_from do |alias_method|
anonymous
anonymous / mikutter-vanish.rb
Created December 5, 2014 06:34
mikutterで「これきらい」を実現するプラグイン
# -*- coding: utf-8 -*-
Plugin.create :vanish do
command(:vanish_message,
name: "これきらい",
condition: Plugin::Command[:CanReplyAll],
visible: true,
role: :timeline ) do |opt|
opt.messages.each do |msg|
Plugin.call(:destroyed, [msg])
@teppeis
teppeis / gist:54cc85137e6b581a6f95
Last active May 18, 2017 02:35
Promise/非同期のテストを簡単にする新しいアサーションヘルパーのご紹介

Promise/非同期のテストを簡単にする新しいアサーションヘルパーのご紹介

この前のブログ記事見た人はごめん。

Promise/非同期のテストは難しい

どこが間違ってるか分かります?

@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//
function! s:_source(path) abort
try
execute ':source' a:path
catch /^Vim\%((\a\+)\)\=:E121/
" NOTE: workaround for `E121: Undefined variable: s:save_cpo`
execute ':source' a:path
endtry
endfunction
@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。