Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View wata727's full-sized avatar

Kazuma Watanabe wata727

View GitHub Profile
@gocanto
gocanto / .travis.yml
Last active September 29, 2018 08:06
MySQL 5.7 Travis CI configuration
language: php
php:
- 7.0
- 7.1
services:
- mysql
addons:
@AsaAyers
AsaAyers / you_dont_need_coffeescript.md
Created September 20, 2016 15:52
You Don't Need CoffeeScript

You Don't Need CoffeeScript

It's time to replace CoffeeScript with Babel and CoffeeLint with eslint.

CoffeeScript was useful a few years ago. It provided many features that JavaScript was lacking. It gave us the fat arrow (lexical this functions), default parameters, destructuring assignments, splats (spread operator), a class keyword, block strings, and more. Everything in the list above is now part of the JavaScript standard. JavaScript is moving forward and gaining

@mcandre
mcandre / docker-push-tag-alias.md
Created May 18, 2015 17:22
How to create new tag aliases for docker images
$ docker tag <image>:<original tag> <image>:<alias>
$ docker push <image>:<alias>
@kazuhei
kazuhei / memcachier.php
Created September 2, 2014 13:48
fuelphp Cache_Storage_Memcachier to use memcachier on heroku
<?php
/**
* Part of the Fuel framework.
*
* @package Fuel
* @version 1.7
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2014 Fuel Development Team
* @link http://fuelphp.com
@sechiro
sechiro / get_aws_billing.sh
Last active April 1, 2019 06:55
aws cliを使って料金を確認。リージョンは「us-east-1」固定(※1)。 ディメンションも「--dimensions Name=Currency,Value=USD」が必須。jqを入れているのは、タイムスタンプ順にソートするため。※1 http://aws.amazon.com/jp/billing/faqs/#Can_I_view_estimated_charge_metrics_or_set_billing_alerts_in_a_region_other_than_US-East
#!/bin/bash
namespace=AWS/Billing
os_name=`uname`
now=`date -u "+%Y-%m-%dT%H:%M:%SZ"`
if [ $os_name = "Darwin" ]; then
yesterday=`date -u -v-1d "+%Y-%m-%dT%H:%M:%SZ"`
else
yesterday=`date -u -d "1 days ago" "+%Y-%m-%dT%H:%M:%SZ"`
fi
start_time=${1:-$yesterday}
@yonchu
yonchu / chpwd_for_zsh.sh
Created October 23, 2012 00:41
zshにてcd後に自動的にlsを行うchpwd関数。ファイル数が多い場合は省略表示します。(.zshrcに設定して使用します)
chpwd() {
ls_abbrev
}
ls_abbrev() {
# -a : Do not ignore entries starting with ..
# -C : Force multi-column output.
# -F : Append indicator (one of */=>@|) to entries.
local cmd_ls='ls'
local -a opt_ls
opt_ls=('-aCF' '--color=always')
@metaskills
metaskills / wait_until.rb
Last active October 20, 2023 13:08
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path