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
# 以下を、.gitconfigの「[alias]」セクションに追記する。 | |
# git ls-gone : リモートブランチの削除された、リモート追跡ブランチを一覧する。 FIXME: 順次問い合わせを行っている都合上、遅い。 | |
# git rm-gone : リモートブランチの削除された、リモート追跡ブランチを削除する。 | |
ls-gone = "!f() { git branch --remotes | awk '{ print $1 }' | while read branchname; do git ls-remote --exit-code $(echo $branchname | sed --expression 's|/| |') &>/dev/null; if [[ $? -eq 0 ]]; then continue; fi; echo $branchname; done }; f" | |
rm-gone = "!f() { git ls-gone | while read branchname; do git branch --delete --force ${branchname#*/} && git branch --remotes --delete $branchname; done }; f" |
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 | |
exist_non_exec_perm_exec_file=0 | |
git diff --cached --name-only --diff-filter=AM | while read path | |
do | |
if head -1 "$path" | grep '^#!' > /dev/null && | |
git ls-files -s "$path" | grep '^100644' > /dev/null | |
then | |
echo $(tput smso)\*\*WARNING\*\*$(tput rmso) $path maybe need \"execution\" permission. Run \`git update-index --add --chmod=x $path\` >&2 | |
exist_non_exec_perm_exec_file=1 |
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
data:application/json,{"configversion":"1.8","subconfigs":{"www.google.com":{"followpagepatterns":{"next":"Next","prev":"Previous"}}},"priority":0,"exmaps":{"<Enter>":"ex.accept_line","<C-j>":"ex.accept_line","<C-m>":"ex.accept_line","<Escape>":"ex.hide_and_clear","<ArrowUp>":"ex.prev_history","<ArrowDown>":"ex.next_history","<C-a>":"text.beginning_of_line","<C-e>":"text.end_of_line","<C-u>":"text.backward_kill_line","<C-k>":"text.kill_line","<C-c>":"text.kill_whole_line","<C-f>":"ex.complete","<Tab>":"ex.next_completion","<S-Tab>":"ex.prev_completion","<Space>":"ex.insert_space_or_completion"},"ignoremaps":{"<S-Insert>":"mode normal","<AC-Escape>":"mode normal","<AC-`>":"mode normal","<S-Escape>":"mode normal","<C-^>":"tab %23","<C-6>":"tab %23"},"imaps":{"<Escape>":"composite unfocus | mode normal","<C-[>":"composite unfocus | mode normal","<C-i>":"editor","<AC-Escape>":"mode normal","<AC-`>":"mode normal","<C-6>":"tab %23","<C-^>":"tab %23","<S-Escape>":"mode ignore"},"inputmaps":{"<Escape>":"composite unf |
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
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = { | |
entry: { | |
js: './script.js', | |
}, | |
output: { | |
filename: '[name].js', | |
path: 'dist' | |
}, |
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
--Awesome WM configuration | |
-- based /etc/xdg/awesome/rc.lua | |
-- Standard awesome library | |
local gears = require("gears") | |
local awful = require("awful") | |
awful.rules = require("awful.rules") | |
require("awful.autofocus") | |
-- Widget and layout library | |
local wibox = require("wibox") |
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 | |
MUTE=`amixer -c 0 get Master|tail -1|cut -d '[' -f 4|sed s/\]//` | |
if [ $MUTE = "on" ] ; then | |
ICON="/usr/share/icons/HighContrast/scalable/status/audio-volume-medium.svg" | |
else | |
ICON="/usr/share/icons/HighContrast/scalable/status/audio-volume-muted.svg" | |
fi |
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
:HOGEコマンド: | |
これはhogehogeをfugafugaします: | |
actual: !vimexpression foo#bar#baz('hogehoge') | |
expected: EXPECTED | |
message: テスト失敗メッセージ | |
内部的にはpiyopiyoです: | |
attribute: [ドキュメント化しないよ] | |
actual: !vimscript | | |
Foo | |
Bar baz |
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 flattenArray() { | |
return this.reduce(function(lhs, rhs) { | |
// lhs is already flatten. | |
if((rhs instanceof Array) && rhs.some(Array.isArray)) rhs = flattenArray.call(rhs); | |
return lhs.concat(rhs); | |
}, []); | |
} |
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! s:ls(all) | |
" Return the STRUCTURED all buffer informations that is similar :ls. | |
" @param[in] all Include "unlisted" buffer informations. | |
" @return | |
" Buffer informations. It's a List that contains Dictionary of a buffer | |
" informatin. Its Dictionary is composed these members: | |
" bufnr: Buffer number. | |
" unlisted: If 1, this buffer is "unlisted", otherwise 0. | |
" focus: "%" means in current window. "#" means alternate buffer. | |
" active: "a" means active buffer. "h" means hidden buffer. |
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
((Get-Content Env:Path) -Split ";" | Where-Object { $_ -notmatch "\b" + "HOGEHOGE" + "\b" }) -Join ";" | Set-Content Env:Path |
NewerOlder