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
// ==UserScript== | |
// @name Distractions | |
// @version 0.1 | |
// @description redirects to something productive | |
// @author You | |
// @include *.reddit.* | |
// @include *.imgur.* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== |
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
#!/bin/bash | |
if [ -z $1 ]; then echo "Please specify a deployment .env file"; fi | |
source $1 | |
echo "Deploying $DOCKER_IMAGE to $VHOST using $1" | |
docker pull $DOCKER_IMAGE | |
docker run -d --name $VHOST -e VIRTUAL_HOST=$VHOST --env-file=$1 "${@:2}" $DOCKER_IMAGE | |
echo "Done!" |
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 | |
DATE=`date +%Y%m%d` | |
NAME=$1 | |
if [[ -z $NAME ]]; then | |
read -p "Enter a tag group name [demo]: " NAME | |
fi | |
NAME=${NAME:-demo} |
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
class CamelCaseMiddleware | |
def call(parent_type, parent_object, field_definition, field_args, query_context, next_middleware) | |
next_middleware.call([parent_type, parent_object, field_definition, transform_arguments(field_args), query_context]) | |
end | |
def transform_arguments(field_args) | |
transformed_args = {} | |
types = {} | |
field_args.each_value do |arg_value| |
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
#!/bin/bash | |
# @author Cole Turner | |
# @website http://coleturner.me/ | |
# @readme This script will extract all .rar files in a directory | |
# while preserving the original files. If "unrar.lock" is | |
# present in the directory, the archive will be skipped. | |
# If the rar was previously extracted and "unrar.lock" is | |
# not present, it will be extracted again. |
NewerOlder