Skip to content

Instantly share code, notes, and snippets.

@dragonken
dragonken / index.html
Last active August 29, 2015 14:22
wagXgQ
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<div class="content">
@dragonken
dragonken / saveUnicodeCSV.bas
Created July 12, 2016 13:40
Excel export Selection to UTF-8 CSV file
Sub saveUnicodeCSV()
'Excel export Selection to UTF-8 CSV file
Set oAdoS = CreateObject("ADODB.Stream")
oAdoS.Charset = "UTF-8"
oAdoS.Mode = 3
oAdoS.Type = 2
oAdoS.Open
Dim rng As Range
@dragonken
dragonken / gist:98859a6c91318bc8cc875ecf46cc986b
Created August 19, 2016 19:11
Mac Finder hide hidden FIles
#!/bin/bash
#Finder show hidden
defaults write com.apple.finder AppleShowAllFiles true
killall Finder
#Fast Keyboard
defaults write NSGlobalDomain KeyRepeat -int 1
defaults read NSGlobalDomain KeyRepeat
@dragonken
dragonken / .vimrc
Last active April 11, 2024 13:27
YAML space indent for vim
syntax on
filetype plugin indent on
"Get the 2-space YAML as the default when hit carriage return after the colon
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set is hlsearch ai ic scs
nnoremap <esc><esc> :nohls<cr>
"https://vim.fandom.com/wiki/Moving_lines_up_or_down
@dragonken
dragonken / .zshrc
Last active July 27, 2017 06:24
zsh terminal local history
# move throug local history, search everything
# https://github.com/robbyrussell/oh-my-zsh/issues/2537
setopt no_share_history
# or
unsetopt share_history
[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
{"keys": ["command+shift+i"], "command": "reindent", "args": {"single_line": false}}
@dragonken
dragonken / git-use-https.sh
Last active November 4, 2018 22:09
Git provides URL rewriting functionality using the url..insteadOf configuration option. So to make all connections to github.com use https:// rather than git://
git config --global url."https://github.com".insteadOf git://github.com
#!/bin/bash
find . -name "_____padding_file_*" -type f -exec mv {} padding \;
@dragonken
dragonken / demo-xargs.txt
Last active November 4, 2018 22:07
xargs {} as the argument list marker: Command Line Arguments
#https://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/
find . -name "*.bak" -print0 | xargs -0 -I {} mv {} ~/old.files