^(.(?!(https?://|\.[a-z]{2,6})))*$
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
#!/usr/bin/env zsh | |
commandIsValid() { | |
cmds=( "h" "help" "l" "list" "z" "zip" "rm" "remove" ) | |
local cmd="$1" | |
for e in $cmds[@]; do | |
if [[ "$e" == "$cmd" ]]; then | |
return 0 | |
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
#!/usr/bin/env zsh | |
#### CONFIG ####################################################################################### | |
#### !!! REQUIRED !!! Put your imgur API key in the `IMGUR_KEY` environment variable. | |
#### Image format | |
# local image_format="jpg" | |
#### Show cursor (only in full screen screenshots) |
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
export ORIG_GEM_PATH=${GEM_PATH:-} | |
export ORIG_GEM_HOME=${GEM_HOME:-} | |
export ORIG_PATH=${PATH} | |
omg() { | |
if [[ "$1" =~ "^h(elp)?\$" ]]; then | |
echo "Usage: omg [h|help|r|reset]" | |
elif [[ "$1" =~ "^r(eset)?\$" ]]; then | |
if [[ -z "$ORIG_GEM_HOME" ]]; then | |
unset GEM_HOME |
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
let barposition = "bottom" | |
set numerichints | |
set typelinkhints | |
unmap gt | |
unmap K | |
unmap gT | |
unmap J | |
unmap E |
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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
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
set hlsearch | |
highlight CurSearch guibg=green | |
nnoremap <silent> N N:silent! call HighlightCurrentMatch()<CR> | |
nnoremap <silent> n n:silent! call HighlightCurrentMatch()<CR> | |
function! HighlightCurrentMatch() | |
let col = col(".") - 1 | |
let endCol = searchpos(getreg("/"), "cne")[1] + 1 | |
let line = line(".") | |
let matchPat = '/\%' . line . 'l\%>' . col . 'c\%<' . endCol . 'c/' |
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
#!/usr/bin/env zsh | |
# | |
# USAGE: autoenv [action] | |
# | |
# Actions: | |
# up (aliased to u) | |
# down (aliased to d) | |
# | |
error() { echo "$@" 1>&2 } |
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
# | |
# Generate a unique token before the creating a | |
# new record. Option to specify an array of | |
# attributes as predicates for the uniqueness check. | |
# The tokenable attribute is always appended to | |
# the list of predicates. | |
# | |
# Example usage in a model: | |
# | |
# class Contribution < ActiveRecord::Base |
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
tell application "Terminal" to activate | |
tell application "System Events" | |
tell process "Terminal" | |
tell menu item "Basic" of menu "New Window" of menu item "New Window" of menu "Shell" of menu bar item "Shell" of menu bar 1 | |
click | |
end tell | |
end tell | |
end tell |
OlderNewer