This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -z `which emacsclient 2>&1` ] && { echo 'emacsclient not found' >&2; exit 1; } | |
[ -z `which git 2>&1` ] && { echo 'git not found' >&2; exit 1; } | |
[ -z `which peco 2>&1` ] && { echo 'peco not found' >&2; exit 1; } | |
function open_emacsclient { | |
if [ $# -eq 0 ]; then | |
TMP_FILE=`mktemp /tmp/emacsclient.XXXXXX` | |
cat > $TMP_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hoge() { | |
var foo = 'aaa'; | |
return function(arg) { | |
return foo + arg; | |
} | |
} | |
var fuga = hoge(); | |
fuga('Z'); | |
//=> aaaZ |
Forked from Yosu Arrillaga Calviño's Pen Portfolio sample with Flexbox.
A Pen by Yosu Arrillaga Calviño on CodePen.
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my-hoge filter="AaaFilter"></my-hoge> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Original: http://masutaka.net/chalow/2014-03-19-2.html | |
echo "brew updating..." | |
brew update | |
outdated=`brew outdated` | |
if [ -n "$outdated" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 設定されたbackground-imageのurlを無効にする場合 | |
$('#hoge').css('background-image', 'none'); | |
// background-imageのurlを変更する場合 | |
$('#hoge').css('background-image', 'url(test.png)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ErrorsEngine < Rails::Engine | |
routes.draw do | |
Site.all.each do |site| | |
match '(errors)/:status', via: [:get, :post, :put, :patch, :delete], to: 'errors#show', constraints: { host: site.hostname, status: /\d{3}/ } | |
end | |
end | |
end | |
unless Rails.application.config.consider_all_requests_local | |
Rails.application.config.exceptions_app = ErrorsEngine.routes |