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
" Turn relative line numbers on/off depending on focus or mode | |
" Place in your .vimrc | |
set number | |
autocmd FocusLost * :set relativenumber! | |
autocmd FocusGained * :set relativenumber | |
autocmd InsertEnter * :set relativenumber! | |
autocmd InsertLeave * :set relativenumber | |
autocmd BufEnter * :set relativenumber | |
autocmd BufLeave * :set relativenumber! |
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
" Helper function to save the session to my vim dir | |
function! s:SaveSession(sessionName) | |
execute "mksession! ~/.vim/session/" . a:sessionName . ".vim" | |
endfunction | |
function! s:RestoreSession(sessionName) | |
execute "source ~/.vim/session/" . a:sessionName . ".vim" | |
endfunction | |
" Create editor commands for the functions |
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
# Add the following to your .bashrc | |
# USAGE: pass "password entry name" | |
function pass() { | |
local PASS=$(passbox get ${1} | grep Password\: | cut -c 10-) | |
echo $PASS > /dev/clipboard # /dev/clipboard is for cygwin but this could be replaced with any clipboard command e.g: | |
# `echo $PASS | xclip -selection clipboard` # Linux with xclip | |
# `echo $PASS | pbcopy # OSX/Darwin | |
echo "" | |
echo "Copied password to clipboard for 15s" |
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
ledger print -l 'amount > 0' Assets:Main # Print entries where an account has recieved a credit | |
ledger reg Assets:Main -b 'this month' # Show running monthly balance | |
ledger budget -b 'this month' # Show if we are on track with budgets this month |
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
" Strip the newline from the end of a string | |
function! Chomp(str) | |
return substitute(a:str, '\n$', '', '') | |
endfunction | |
" Find a file and pass it to cmd | |
function! DmenuOpen(cmd) | |
let fname = Chomp(system("git ls-files | rofi -dmenu -i -l 20 -p " . a:cmd)) | |
if empty(fname) | |
return |
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
type SubscriptionFn = (data: object) => void | |
interface EventSubscription { | |
event: GameEvent; | |
fn: SubscriptionFn; | |
} | |
export enum GameEvent { | |
MouseClick | |
} |
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 TIMELOG="/home/rbollons/Documents/Work Log/Log.timeclock" | |
log_time_in () { | |
echo i $(date "+%Y-%m-%d %H:%M:%S") $* >>$TIMELOG | |
} | |
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
map <C-b> :buffer<Space> |
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
import { Component, Vue } from 'vue-property-decorator'; | |
import AppHtml from './app.html'; | |
import { MapComponent, HeaderComponent, LeftPanelComponent } from '../'; | |
@Component({ |
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
import L from 'leaflet'; | |
import 'leaflet-routing-machine'; | |
import data from '../../data.json'; | |
const tileLayerUrl = `https://cartodb-basemaps-{s}.global.ssl.fa |
OlderNewer