Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh root@123.123.123.123
Add ssh fingerprint and enter password provided in email
B2_ACCOUNT_ID=XXXXXXXXXXXXXXXXXXXXXXXXX | |
B2_ACCOUNT_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
RESTIC_REPOSITORY=b2:XXXXXXXXXXXXXXXXXX:/ | |
RESTIC_PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
BACKUP_PATHS="/home/naomi.nagata" | |
BACKUP_EXCLUDES="--exclude-file /home/rupert/.restic_excludes --exclude-if-present .exclude_from_backup" | |
RETENTION_DAYS=7 | |
RETENTION_WEEKS=4 |
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
$ brew install openssl readline | |
$ CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p353 |
######################################################################################### | |
# Manage websites | |
class Dashboard::WebsitesController < ApplicationController | |
before_action :find_website, only: %w(show edit update destroy) | |
def index | |
@websites = current_user.websites | |
end |
require "awesome_print" | |
module XmlParsing | |
require "ox" | |
class Reader < ::Ox::Sax | |
def initialize file_path, target, target_handler | |
@target_handler = target_handler | |
@target = target | |
@file_path = file_path |
#!/bin/bash | |
EXAMS_URL="https://exams.doc.ic.ac.uk/" | |
echo "##############################################" | |
echo "# Exam Results Checker" | |
echo "##############################################" | |
echo -ne "Username: " | |
read username | |
stty -echo |
#!/bin/sh | |
# This pre-push hook will run 'rake' command to check if your test | |
# suite passes by looking for ', 0 failures' in the 'rake' output | |
# If found, will return exit and the git push command will continue | |
# Make sure you remove the .sh extension and put the hook into your | |
# .git/hooks directory in your project | |
# -------------------------------------------------------------------- |
# This script verifies if a list of "undesired" words are presented in the files you are intented to commit such console | |
# output, debugging information or keys/tokens/passwords | |
# Based on the git hook created by Mark Story | |
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes | |
# Instructions: | |
# Put this file into your .git/hooks folder and remove the .sh extension |
# _utils.sh --- Utilities used across all the scripts. | |
set -e | |
set -o pipefail | |
# Prints spaces as a prefix to the command's output. | |
function prefixed { | |
sed -e "s/^/ /" | |
} |