This file contains hidden or 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 | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Get directory name from argument, default is "my-app" | |
APP_NAME=${1:-"my-app"} | |
# Check if directory already exists | |
if [ -d "$APP_NAME" ]; then |
This file contains hidden or 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
module RidgepoleTask | |
extend Rake::DSL | |
namespace :ridgepole do | |
desc "Exec Apply Dry Run" | |
task(apply_dry_run: :environment) { ridgepole "--apply --dry-run" } | |
desc "Exec Apply" | |
task(apply: :environment) { ridgepole "--apply --drop-table" } |
This file contains hidden or 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
var $jscomp = $jscomp || {}; | |
$jscomp.scope = {}; | |
$jscomp.arrayIteratorImpl = function(a) { | |
var d = 0; | |
return function() { | |
return d < a.length ? { | |
done: !1, | |
value: a[d++] | |
} : { | |
done: !0 |
This file contains hidden or 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
require 'nokogiri' | |
html = <<HTML | |
<main> | |
<div>plain div</div> | |
<div class="test">test</div> | |
<div class="test">test</div> | |
</main> | |
HTML |
This file contains hidden or 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
<script src="https://cdn.jsdelivr.net/gh/thelevicole/[email protected]/dist/YouTubeToHtml5.js"></script> | |
<video data-yt2html5="https://www.youtube.com/watch?v=ScMzIvxBSi4" playsinline autoplay muted loop ></video> | |
<script> | |
new YouTubeToHtml5(); | |
</script> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
} |
This file contains hidden or 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
require 'time' | |
wd = ["日", "月", "火", "水", "木", "金", "土"] | |
while line = gets | |
begin | |
pos = line.index('\t') | |
time_text = line[0..pos] | |
cmd = line[pos..line.size].strip | |
time = Time.parse(time_text) |
This file contains hidden or 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
alias reloadDNS="sudo killall mDNSResponder && sudo dscacheutil -flushcache" |
This file contains hidden or 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
import sys | |
import os | |
import datetime | |
import subprocess | |
from keyhac import * | |
def configure(keymap): | |
keymap_terminal = keymap.defineWindowKeymap( app_name="com.googlecode.iterm2" ) # iterm2だけのローカル設定 | |
keymap_terminal["Ctrl-J"] = "104" # CTRL-Jを入力するとかなを送信。104はかなキーの仮想キーコード |
This file contains hidden or 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
set-option -g default-terminal screen-256color | |
# set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set -g terminal-overrides 'xterm:colors=256' | |
set -g pane-border-status top | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
# Setup 'v' to begin selection as in Vim | |
bind-key -T copy-mode-vi v send -X begin-selection |
This file contains hidden or 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
# Pure | |
# by Sindre Sorhus | |
# https://github.com/sindresorhus/pure | |
# MIT License | |
# change this to your own username | |
DEFAULT_USERNAME='sindresorhus' | |
# threshold (sec) for showing cmd exec time |
NewerOlder