Skip to content

Instantly share code, notes, and snippets.

🦉
owl be coding

Maddison Hellstrom b0o

View GitHub Profile
View rclone-dropbox-maddy.service
[Unit]
Description=rclone sync (dropbox-maddy)
Documentation=http://rclone.org/docs/
After=network-online.target
[Service]
ExecStart=rclonesync-daemon -r dropbox-maddy:/Documents -s /home/maddy/Dropbox -w -t 30 -i 120 -u maddy sync
Restart=on-failure
RestartSec=5
View rclonesync-daemon
#!/bin/bash
set -euo pipefail
initfile_name="rclonesync-init.txt"
watch=0
watch_interval=-1
watch_timeout=30
cmd=""
remote=""
View hlmgr.vim
function s:hlmgr(...)
let this = {}
let this.stack = []
func! this.push(rect)
let self.stack = [ a:rect ] + self.stack
endfunc
func! this.pop()
let [ l:rect; self.stack ] = self.stack
@b0o
b0o / key.md
Created Feb 28, 2019 — forked from shobotch/key.md
Twitter (un)official Consumer Key
View key.md

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN
Consumer key:    IQKbtAYlXLripLGPWd0HUA
View vim-airline.vim
function! ReggieStatus()
let l:pasteReg = g:GetPasteReg()
let l:yankReg = g:GetYankReg()
if l:pasteReg == l:yankReg
if l:pasteReg == '"'
return
endif
return 'yp="'.l:pasteReg
endif
return 'y="'.l:yankReg.',p="'.l:pasteReg
View reggie.vim
function! s:regPrompt()
echo "SetReg: "
let l:rawchar = getchar()
let l:char = nr2char(l:rawchar)
call s:setReg(l:char)
endfunction
command! -bar -nargs=0 RegPrompt call <sid>regPrompt()
nnoremap <leader>" :RegPrompt<cr>
View xcqr
#!/bin/bash
qrencode -o - -s 1 \
"$(xclip -out -selection clipboard)" |
feh --zoom max \
--force-aliasing \
--image-bg white \
-
View main.go
for {
buf := make([]byte, 1024*4)
n, err := res.Body.Read(buf)
if err == io.EOF {
break
}
cbuf <- buf[:n]
select {
case <-cquit:
err = fmt.Errorf("force quit")
View .zshrc
rawurlencode() {
local string="$@"
local strlen=${#string}
local encoded=""
local pos c o
for (( pos=0 ; pos<strlen ; pos++ )); do
c=${string:$pos:1}
case "$c" in
You can’t perform that action at this time.