Skip to content

Instantly share code, notes, and snippets.

@davidfsmith
davidfsmith / aws_source.zsh
Last active December 10, 2018 05:16
Upload a file to S3 for sharing, link is shortened using Bitly
# Quick sharing of files via S3/presigned URLs
# Location: ~/.zsh.after/aws_source.zsh
function share {
AWS_PROFILE=<aws_profile>
BUCKET=$(whoami)-share
BITLY_USER="<username>"
BITLY_TOKEN="<generic_access_token>"
EXPIRY_DAYS=30
@davidfsmith
davidfsmith / weather.sh
Last active June 28, 2018 11:19
Add the weather to an image and set it as the wallpaper (OSX) - Uses https://github.com/chubin/wttr.in to get the weather data.
#!/usr/bin/env bash
# https://gist.github.com/davidfsmith/0fc2223eeb06a669a91b05c1273d6d4c
timestamp() {
date +"%s"
}
LOCATION="Horsham"
PICTURE="wallpaper"
set -g status-bg black
set -g status-fg white
set -g window-status-current-fg green
# Custom modifier key
set -g prefix C-Space
unbind-key C-b
bind-key C-Space send-prefix
# Terminal improvements
@davidfsmith
davidfsmith / .jshintrc.js
Last active April 28, 2016 17:49
A frontend build thing....
{
// Taken from https://gist.github.com/connor/1597131
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.

Keybase proof

I hereby claim:

  • I am davidfsmith on github.
  • I am davidfsmith (https://keybase.io/davidfsmith) on keybase.
  • I have a public key whose fingerprint is 667F 0787 35E0 2020 36E9 B71D C4E9 73F5 B5F9 EE51

To claim this, I am signing this object:

# Ensures all line endings are committed as LF, but will checkout with native line endings
* text=auto
# -- Override Section, just in-case Git tries to be sneaky
# Ensure that these files are recognized as text
*.asp text
*.aspx text
*.asx text
*.c text