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
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])
# 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|
@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
@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:

@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..."
@shkumagai
shkumagai / how_to_write_go_code.rst
Last active March 30, 2023 03:54
How to Write Go Code
@sansmischevia
sansmischevia / nginx.conf
Last active June 3, 2024 22:56
nginx http proxy to s3 static websites
##
## This nginx.conf servers as the main config file for webflow reverse proxy
##
## RCS:
## https://gist.github.com/sansmischevia/5617402
##
## Hardening tips:
## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
##
@mechamogera
mechamogera / Gemfile
Last active May 20, 2016 17:34
Zabbix APIをRubyから利用する場合どのライブラリが良いのか調べてみる
# A sample Gemfile
source "https://rubygems.org"
gem 'rubix'
gem 'zabbixapi'
gem 'zabby'
gem 'zbxapi'
@haru067
haru067 / mikutterAdventCalendar2012.md
Created December 10, 2012 05:16
mikutter Advent Calendar 10日目

mikutter Advent Calendar 10日目

(´へεへ`*) < 10日目だよ〜

(´へεへ`*) < 昨日は@penguin2716氏、明日は@teshi04氏だよ〜

 

(´へεへ`*) < ………

@0xjjpa
0xjjpa / chrome.md
Created December 9, 2012 04:37
Understanding Google Chrome Extensions

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job