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 | |
# ~/.config/bspwm/bspwmrc | |
#... | |
bspc config external_rules_command ~/.config/bspwm/scripts/external_rules.sh |
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 prefix = process.env.THEME === 'mat' ? 'md' : 'ios' | |
export default { | |
name: 'QIcon', | |
props: { | |
name: String, | |
color: String, | |
size: String | |
}, | |
computed: { |
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
<?php | |
namespace App; | |
require __DIR__.'/bootstrap/autoload.php'; | |
$app = require_once __DIR__.'/bootstrap/app.php'; | |
$kernel = $app->make(\Illuminate\Contracts\Console\Kernel::class); | |
$kernel->bootstrap(); | |
\DB::statement("..."); |
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! SearchWithSkip(pattern, flags, stopline, timeout, skip) | |
" | |
" Returns true if a match is found for {pattern}, but ignores matches | |
" where {skip} evaluates to false. This allows you to do nifty things | |
" like, say, only matching outside comments, only on odd-numbered lines, | |
" or whatever else you like. | |
" | |
" Mimics the built-in search() function, but adds a {skip} expression | |
" like that available in searchpair() and searchpairpos(). | |
" (See the Vim help on search() for details of the other parameters.) |
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
call textobj#user#plugin('phpfunction', { | |
\ '-': { | |
\ 'select-a-function': 'CurrentPhpFunctionA', | |
\ 'select-a': 'af', | |
\ 'select-i-function': 'CurrentPhpFunctionI', | |
\ 'select-i': 'if', | |
\ }, | |
\ }) | |
function! CurrentPhpFunctionI() |
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 | |
# Get the current non-leaf focused node | |
NODE=$(bspc query -N -n focused.\!leaf) | |
if [ $? -ne 0 ]; then | |
# No non-leaf, then select parent of focused node | |
NODE=$(bspc query -N -n @parent) | |
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
" http://stackoverflow.com/questions/2683521/vim-search-in-c-c-code-lines | |
function! SearchWithSkip(pattern, flags, stopline, timeout, skip) | |
" | |
" Returns true if a match is found for {pattern}, but ignores matches | |
" where {skip} evaluates to false. This allows you to do nifty things | |
" like, say, only matching outside comments, only on odd-numbered lines, | |
" or whatever else you like. | |
" | |
" Mimics the built-in search() function, but adds a {skip} expression |
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
# With FASD and FZF installed | |
# CTRL-J - Fasd fast jump | |
fzf-fasd-widget() { | |
local cmd="${FZF_ALT_C_COMMAND:-"command fasd -Rdl"}" | |
cd "${$(eval "$cmd" | $(__fzfcmd) +m):-.}" | |
zle reset-prompt | |
} | |
zle -N fzf-fasd-widget | |
bindkey '^J' fzf-fasd-widget |
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:escape(path) | |
return substitute(a:path, ' ', '\\ ', 'g') | |
endfunction | |
function! GitLsHandler(line) | |
execute 'e '. s:escape(a:line) | |
endfunction | |
command! -nargs=* Fgl call fzf#run({ | |
\ 'source': 'git ls-files -o -c --exclude-standard "<args>"', |
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:escape(path) | |
return substitute(a:path, ' ', '\\ ', 'g') | |
endfunction | |
function! GitGrepHandler(line) | |
let parts = split(a:line, ':') | |
let [fn, lno] = parts[0 : 1] | |
execute 'e '. s:escape(fn) | |
execute lno | |
normal! zz |