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
// ==UserScript== | |
// @name Premii Hacker News improvements | |
// @namespace github.com/kane-c | |
// @version 1.0.0 | |
// @description Enhance hn.premii.com | |
// @author @kane-c | |
// @match https://hn.premii.com/ | |
// @icon https://hn.premii.com/a/icon/hn/Icon-32.png | |
// @grant none | |
// @updateURL https://gist.github.com/kane-c/c812e42be4accb0ff1db92562f6d5bf2/raw/2196f413be8abdd3793c2ab5adef715d7ca5dea5/premii.user.js |
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
// | |
// GoogleMeet.js | |
// BeardedSpice | |
// | |
// Created by @kane-c. | |
// Copyright (c) 2015-2017 GPL v3 http://www.gnu.org/licenses/gpl.html | |
// | |
// We put the copyright inside the plist to retain consistent syntax coloring. |
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
brew-upgrade() { | |
(set -x; brew update;) | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
reset=`tput sgr0` | |
casks=( $(brew cask outdated) ) | |
for cask in ${casks[@]} |
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
#!/usr/bin/env sh | |
# Usage: backup.sh database username container-name drive-folder-id gpg-recipient | |
# Requires gdrive: https://github.com/prasmussen/gdrive | |
# wget 'https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download' -O /usr/local/bin/gdrive | |
# chmod +x /usr/local/bin/gdrive | |
# Store Postgres credentials in `.pgpass` and gdrive configuration in `.gdrive.conf` | |
# Ensure GPG is configured too | |
timeslot=`date '+%Y%m%d%H%M'` | |
user=$2 | |
database=$1 |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme", | |
"detect_indentation": true, | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".git", | |
".hg", | |
".idea", |
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
#!/bin/sh | |
# Usage: . ./macos-update.sh (so that upgrade_oh_my_zsh works) | |
echo 'Updating brew' | |
brew update | |
brew upgrade --all | |
brew cleanup | |
echo 'Updating shell' | |
upgrade_oh_my_zsh | |
echo 'Updating Docker and its images' | |
dinghy upgrade |
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
#!/usr/bin/env python | |
""" | |
Simple server to create OS notifications. | |
Example usage with Django: | |
To get a notification when the Django development server is running or has just | |
reloaded in resoonse to a code change, append this to `wsgi.py`: | |
``` | |
import requests | |
try: |
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
#!/bin/sh -e | |
# Semantic versioning automatic bump and optional push | |
# First, add this to your `.gitconfig` | |
# [alias] | |
# max-tag = !echo $((echo $(git config --get bump.prefix)0.0.0 && git tag -l "$(git config --get bump.prefix || echo)*.*.*") | (git config --get bump.prefix && sed "s/$(git config --get bump.prefix)//g" || cat) | sort -s -t . -k 1,1n -k 2,2n -k 3,3n | tail -n 1) | |
# Then add this file (chmod +x) to your PATH. | |
# Optionally add a tag prefix (e.g. `v`) globally or per repo: | |
# git config --global --add bump.prefix v |
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
#!/bin/sh | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
DIR=`pwd` | |
for project in $(find * -type d -maxdepth 0) | |
do | |
cd $project | |
if [ -d ".git" ] |
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
#!/usr/bin/env bash | |
apt-get update | |
apt-get dist-upgrade -y | |
apt-get autoremove -y | |
apt-get clean | |
apt-get autoclean | |
pip install -U pip virtualenvwrapper | |
npm update -g |
NewerOlder