Skip to content

Instantly share code, notes, and snippets.

@banyan
banyan / settings.json
Created February 8, 2020 10:22
Configure font to look like codesandbox in vscode
{
"editor.fontFamily": "Dank Mono, Menlo, 'Source Code Pro'",
"editor.fontSize": 13,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
],
"settings": {
FROM busybox
ENTRYPOINT ["/bin/cat"]
CMD ["/etc/passwd"]
@banyan
banyan / Gemfile
Created June 12, 2014 07:42
oj benchmark
source 'https://rubygems.org'
gem 'multi_json'
gem 'yajl-ruby'
gem 'json'
gem 'oj'
// ==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

test of http-proxy-middleware

<?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');
# 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:
/**
* 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 January 2, 2016 14:39
papertrail setttings for rails4 application
# 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}")
@banyan
banyan / post-commit
Last active December 28, 2015 22:49
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