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
ul | |
- data.test.items.each do |item| | |
li | |
= item.name | |
ul | |
- item.subitems.each do |subitem| | |
li = subitem.subname |
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
sudo gem uninstall -axI `gem list --no-versions | grep -v (sqlite|libxml) ` |
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
# http://0.0.0.0:8000 | |
python -m SimpleHTTPServer |
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
# 直前のコミットとの差分 | |
git archive --format=zip --prefix=archive/ HEAD `git diff --name-only HEAD HEAD~1` -o archive.zip | |
# 特定のコミットとの差分 | |
git archive --format=zip --prefix=archive/ HEAD `git diff --name-only HEAD コミットのハッシュ値` -o archive.zip | |
# http://h2ham.net/git-diff-file-zip |
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
# 参考: | |
# https://gist.github.com/mollifier/4979906 | |
# http://webtech-walker.com/archive/2008/12/15101251.html | |
######################################## | |
# 環境変数 | |
export LANG=ja_JP.UTF-8 | |
# 色を使用出来るようにする |
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
// Retina Background Image | |
// 第1引数に画像のファイル名 | |
// 第2引数に画像の倍率(@2xなら2、@3xなら3) | |
=retinaBgImg($image:"image.png", $ratio:2) | |
$imageWidth: image-width($image) / $ratio | |
$imageHeight: image-height($image) / $ratio | |
background-image: image-url($image) | |
background-size: $imageWidth $imageHeight | |
background-repeat: no-repeat |
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/sh | |
DIRPATH=$1 | |
for FILE in ${DIRPATH}*.mkv | |
do | |
# AAC | |
# ffmpeg -y -i "${FILE}" -vcodec copy -acodec aac -strict experimental -ab 320k "${FILE%.mkv}.mp4" | |
# Stream Mapping | |
ffmpeg -y -i "${FILE}" -vcodec copy -acodec aac -strict experimental -ab 320k -map 0:0 -metadata:s:v:0 language=jpn -map 0:1 -metadata:s:a:1 language=jpn "${FILE%.mkv}.mp4" | |
done |
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
//= include ../libs/jquery.min.js | |
//= include ./_common.js | |
console.log('Hello world'); |
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
document.addEventListener('DOMContentLoaded', function(){ | |
// imgタグ一覧を取得 | |
var _images = document.getElementsByTagName('img'); | |
// _imagesがオブジェクト(ノードリスト)なので配列に変換する | |
var _imagesArray = Array.prototype.slice.call(_images); | |
// _imagesArrayをforEachで回す | |
// 正規表現にマッチしたら、画像URLの拡張子直前の数字を全部1280に書き換え | |
_imagesArray.forEach(function(element, index, array){ |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
OlderNewer