Skip to content

Instantly share code, notes, and snippets.

@hibiki
hibiki / 0_reuse_code.js
Created June 12, 2016 19:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hibiki
hibiki / github-create-pull.coffee
Last active August 29, 2015 14:20
Slack から Hubot 経由で GitHub のプルリクを作る ref: http://qiita.com/hibiki/items/6ae8c6a8e4710e928e37
#
# Description:
# create pull requests in a Github repository
#
# Dependencies:
# "githubot": "0.4.x"
#
# Configuration:
# HUBOT_GITHUB_TOKEN
# HUBOT_GITHUB_API
@hibiki
hibiki / birthday.coffee
Created April 27, 2015 21:00
メンバーの誕生日にお祝いメッセージをHubotからSlackに流す ref: http://qiita.com/hibiki/items/b128550a070059f6a4ed
#
# Description:
# 誕生日を祝うよ
#
# Commands:
#
#
cronJob = require('cron').CronJob
@hibiki
hibiki / backlog-to-trello.coffee
Last active May 19, 2016 14:29
Backlogの課題が追加されたらHubotからTrelloにカードを追加する ref: http://qiita.com/hibiki/items/ea080be12c03a98bf3a7
#
# Description:
# Backlog to Trello
#
# Dependencies:
# "node-trello": "^1.1.1"
#
# Configuration:
# HUBOT_TRELLO_KEY
# HUBOT_TRELLO_TOKEN
# Description:
# No overtime by node-cron.
cron = require('cron').CronJob
random = require('hubot').Response::random
module.exports = (robot) ->
new cron '0 0 18 * * 1-5', () ->
say = '定時退社の時間になりました。' + random [
@hibiki
hibiki / functions.php
Last active December 29, 2015 18:28
WordPress の CSS / JS に任意のクエリパラメータをつける。キャッシュが効いてる環境などで手動で新しいの読ませてテストするなど用。
//プラグインで読み込む CSS / JS 用
function vc_remove_wp_ver_css_js( $src ) {
if ( strpos( $src, 'ver=' ) )
$src = remove_query_arg( 'ver', $src );
$src = $src . '?ver=11300348';
return $src;
}
add_filter( 'style_loader_src', 'vc_remove_wp_ver_css_js', 9999 );
add_filter( 'script_loader_src', 'vc_remove_wp_ver_css_js', 9999 );
@hibiki
hibiki / jsdoit.css
Created February 9, 2013 02:39
チェックボックスの、全てにチェックをトグルしたり
label {
display: block;
}
@hibiki
hibiki / README
Created February 9, 2013 02:19
画像のロールオーバー(画像プリロード)
btn.gif -> btn_on.gif
img に .btn をつける。
@hibiki
hibiki / gist:4054161
Created November 11, 2012 08:25
_gvimrc
" vim:set ts=8 sts=2 sw=2 tw=0: (この行に関しては:help modelineを参照)
"
" Last Change: 09-Nov-2012.
" Maintainer: y.y
"
helptags $VIM/vim73/doc
runtime macros/matchit.vim
"///////////////////////////////////////////////////////////////////////////
"
" vimrc 上書き設定
@hibiki
hibiki / gist:4054159
Created November 11, 2012 08:24
neobundle用
"---------------------------------------------------------------------------
" neobundle.vim
"---------------------------------------------------------------------------
set nocompatible " Be iMproved
filetype off " Required!
if has('vim_starting')
" set runtimepath+=d:/tool/vim/.bundle/neobundle.vim
" call neobundle#rc(expand('d:/tool/vim/.bundle'))
set runtimepath+=~/.bundle/neobundle.vim