Skip to content

Instantly share code, notes, and snippets.

Kohei Hasegawa banyan

Block or report user

Report or block banyan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lastfm.download.helper.user.js
// ==UserScript==
// @name Last.fm Download Helper
// @namespace http://d.hatena.ne.jp/bannyan/
// @description It helps you Last.fm free download easily.
// @include http://*last.fm/*
// @include http://www.lastfm.jp/*
// ==/UserScript==
// Configure
View README.md

test of http-proxy-middleware

View jsonRPCClient.php
<?php
/**
* @dependency Zend/Json.php - http://framework.zend.com/
*
* This file is modifying JSON-RPC PHP which depends on `Zend/Json.php`.
* The original file - http://jsonrpcphp.org/
*/
require_once('Zend/Json.php');
View phpenv-install-system-wide.sh
# Worked under these envelopment
#
# AMI: amzn-ami-pv-2012.09.0.x86_64-ebs (ami-4e6cd34f)
# Zone: ap-northeast-1b
# Type: m1.large
#
# CentOS phpenv (https://github.com/CHH/phpenv) system wide installation script
# Execute as root user.
# Set group to use phpenv:
View jquery.disable-double-submit.js
/**
* jquery.disableDoubleSubmit
*
* @description When submit, the element will be disabled and show loading image.
* @author http://d.hatena.ne.jp/bannyan/
* @license The MIT License
* @version 1.0
* @link http://gist.github.com/473424
*
* @usage
@banyan
banyan / papertrail-settings-for-rails4.rb
Last active Jan 2, 2016
papertrail setttings for rails4 application
View papertrail-settings-for-rails4.rb
# config/environments/production.rb
# Be sure to add remote_syslog_logger to Gemfile
config.after_initialize do
if ENV["SYSLOG_URL"]
require "remote_syslog_logger"
require "uri"
url = URI.parse(ENV["SYSLOG_URL"])
logger = RemoteSyslogLogger.new(url.host, url.port, program: "#{url.path[1..-1]}-#{Rails.env}")
View post-commit
systemsetup -getusingnetworktime | grep On >/dev/null 2>&1
if [ $? -ne 0 ]; then
systemsetup -setusingnetworktime on
echo "Hi, bring back to now from a future."
sleep 1
git commit -C HEAD --amend --date="`LANG=en date`"
fi
View update-irc-hooks-events.rb
#!/usr/bin/env ruby
require 'pit'
require 'octokit'
slug = ARGV[0]
unless slug
abort "Usage #{$0} slug"
end
@banyan
banyan / gist:6778539
Created Oct 1, 2013
4th-token for benesse
View gist:6778539
basic_201310, 993485
basic_201310, 328750
basic_201310, 546413
basic_201310, 704981
basic_201310, 167810
basic_201310, 303238
basic_201310, 797833
basic_201310, 121456
basic_201310, 092737
basic_201310, 490033
View update-hipchat-hooks-event.rb
#!/usr/bin/env ruby
require 'pit'
require 'octokit'
org_name = ARGV[0]
unless org_name
abort "Usage #{$0} org_name"
end
You can’t perform that action at this time.