sudo apt install curl git
curl -L https://nixos.org/nix/install | sh -s -- --daemon
# follow prompts
git clone <this-repo> ~/nix
# edit files, replace my username with yours
cd ~
mkdir -p ~/.local/state/nix/profiles
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --verbose
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
10a11 | |
> set $hyper Mod4+Mod1+Ctrl+Shift | |
61a63,66 | |
> input "type:keyboard" { | |
> xkb_layout us | |
> xkb_variant dvorak | |
> } | |
74c79 | |
< bindsym $mod+d exec $menu | |
--- |
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
function onOpen(e) { | |
DocumentApp.getUi().createAddonMenu() | |
.addItem('Start', 'showSidebar') | |
.addToUi(); | |
showSidebar() | |
} | |
function onInstall(e) { | |
onOpen(e); | |
} |
- update status more often https://unix.stackexchange.com/q/358129
- run script in status https://unix.stackexchange.com/a/83418
- multiple line status bar tmux/tmux#2225
- existing keylogger that doesn't work for me https://github.com/concise/tmux-keylogger
tmux set-option status 2
tmux set -g status-interval 1
tmux set-option -g 'status-format[1]' "#[fg=red,bg=default]#(uptime | awk '{print $3}'|sed 's/,//') #[fg=blue]%a%d-%m-%Y %H:%M:%S"
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
# get back a list of urls for search term | |
# $ goog stuart-warren github | |
# $ goog site:stackoverflow.com ValueError | |
goog() { | |
# uses https://github.com/mgdm/htmlq | |
query=${@} | |
v="" | |
if [[ "$1" == "-v" ]]; then v="-v"; fi | |
curl ${v} -LG --data-urlencode "q=${query}" \ | |
--data-urlencode "sourceid=chrome" \ |
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
[Unit] | |
Description=Greengrass OTA Daemon | |
[Service] | |
Environment=GG_BASE_DIR=/greengrass | |
Type=forking | |
Restart=on-failure | |
RestartSec=5 | |
ExecStart=${GG_BASE_DIR}/ota/ota_agent/ggc-ota | |
[Install] | |
WantedBy=multi-user.target |
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 boto | |
import time | |
ec2 = boto3.Session(region_name="eu-west-1").client('ec2') | |
eips_to_create = 9 | |
def get_eip_quota(): | |
# get limit of ElasticIps for account | |
quota = 0 | |
for acc_attr in ec2.describe_account_attributes().get('AccountAttributes'): |
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
version: "3.8" | |
services: | |
chrome: | |
network_mode: "host" | |
image: jess/chrome | |
environment: | |
DISPLAY: 'unix:0' | |
volumes: | |
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket |
NewerOlder