This file contains hidden or 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-hook after-split-window 'run "echo split > ~/tmux.log' | |
set-hook before-new-window 'run "date >> ~/tmux.log"' |
This file contains hidden or 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
# /home/peter/.config/tmuxinator/foo.yml | |
name: foo | |
root: ~/ | |
tmux_options: -f <%= args[0] %> | |
windows: | |
- one: | |
- echo logs | |
- two: | |
- echo left |
This file contains hidden or 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
You may see the following (confusing) error message when using trying to create an entity URL for an entity which uses an `AutoField` primary key | |
`Reverse for 'foo_update' with arguments '('',)' not found. 1 pattern(s) tried: ['foos/(?P<pk>[0-9]+)/edit/$']` | |
So, in your view: | |
`<a href="{% url 'foo_update' foo.id %}">edit</a>` | |
... should be: | |
`<a href="{% url 'foo_update' foo.foo_id %}">edit</a>` |
This file contains hidden or 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
-- adding example here for posterity's sake | |
-- original example can be found at: https://ellie-app.com/jHzNw9Qjqca1 | |
-- source material can be found at: https://developing.enectiva.cz/2017/05/31/custom-flags-decoder-in-elm/ | |
module Main exposing (main) | |
import Html exposing (Html, text, programWithFlags) | |
import Json.Decode | |
This file contains hidden or 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
# https://old.reddit.com/r/vim/comments/a65qfe/do_you_use_bash_vi_mode/ebsd4bu/ | |
set completion-ignore-case On | |
#TAB: menu-complete | |
Tab: complete | |
set editing-mode vi | |
# operate-and-get-next allows you to navigagte to history | |
# and then keep executing commands successively from | |
# that point onwards |
This file contains hidden or 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 bash | |
set -euo pipefail | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
echo "DIR: $DIR" | |
SRC="$DIR/../src/program.js" | |
DEST="$DIR/../build/data-$BUILD_ID.js" | |
echo "SRC: $SRC" | |
echo "DEST: $DEST" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charSet="utf-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> | |
<meta name="generator" content="Gatsby 2.0.68" /> | |
<link as="script" rel="preload" href="/component---src-pages-index-js-ac2364b3c7ba3836ce1f.js" /> | |
<link as="script" rel="preload" href="/app-b7a4b847d9bcda823daf.js" /> |
This file contains hidden or 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 Elm = require("react-elm-components"); | |
const React = require("react"); | |
const ElmApplication = require("./src/Main.elm"); | |
const ScenesComponentElm = ({scenes}) => ( | |
<Elm | |
flags={{ scenes: scenes }} | |
src={ElmApplication.Elm.Main} | |
/> | |
); |
This file contains hidden or 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
IP_LOOKUP="$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')" # May not work for VPN / tun0 | |
IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')" # May not work for VPN / tun0 | |
#IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP | |
IP="192.168.1.125" # use $IP, if set, otherwise IP_LOOKUP | |
IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP | |
DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever. | |
echo "### Make sure your IPs are correct, hard code ServerIP ENV VARs if necessary\nIP: ${IP}\nIPv6: ${IPv6}" | |
docker run -d \ | |
--name pihole \ |
This file contains hidden or 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! InsertHyphensAndUnderscores() | |
execute "normal! i- wi_f#gea_" | |
endfunction | |
function! InsertEmptyLines() | |
silent g/.\n\n\@!/norm o | |
endfunction | |
function! FormatComicListEntries() | |
execute "normal! gg^VG:sort\<CR>" |