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
| from gi.repository import Gtk | |
| from gi.repository import WebKit | |
| import urlparse | |
| BASE_URL = 'https://cloud.digitalocean.com/v1/oauth/' | |
| CLIENT_ID = 'specialsnowflake' | |
| CALLBACK_URL = 'http://andrewsomething.com' | |
| class AuthWin(Gtk.Window): |
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
| $ git push deploy | |
| ++ id -un | |
| + [[ dokku != \d\o\k\k\u ]] | |
| + [[ -n git-receive-pack 'nodejs' ]] | |
| + export -n SSH_ORIGINAL_COMMAND | |
| + /usr/local/bin/dokku git-receive-pack ''\''nodejs'\''' | |
| ++ id -un | |
| + [[ dokku != \d\o\k\k\u ]] | |
| + [[ -n '' ]] | |
| + case "$1" in |
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 ruby | |
| require 'droplet_kit' | |
| require 'json' | |
| token = ENV['DO_TOKEN'] | |
| client = DropletKit::Client.new(access_token: token) | |
| droplet_id = ARGV[0] | |
| snapshot_name = ARGV[1] || Time.now.strftime("%b. %d, %Y - %H:%M:%S %Z") |
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
| module['exports'] = function echoHttp (hook) { | |
| hook.debug("Debug messages are sent to the debug console"); | |
| hook.debug(hook.params); | |
| hook.debug(hook.req.path); | |
| hook.debug(hook.req.method); | |
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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: unicorn initscript | |
| # Description: unicorn | |
| ### END INIT INFO |
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/python | |
| """ | |
| This script take a cloud-config file as input and returns the 'shellified' | |
| script that would be produced by cloudinit from the runcmd stanza. | |
| https://github.com/number5/cloud-init/blob/74e61ab27addbfcceac4eba254f739ef9964b0ed/cloudinit/config/cc_runcmd.py | |
| https://github.com/number5/cloud-init/blob/74e61ab27addbfcceac4eba254f739ef9964b0ed/cloudinit/util.py#L1708 | |
| """ |
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
| Vagrant.configure('2') do |config| | |
| config.ssh.private_key_path = 'sshkey/id_rsa' | |
| config.vm.box ='ubuntu/trusty64' | |
| config.vm.network "forwarded_port", guest: 80, host: 8080 | |
| provider_is_do = (!ARGV.nil? && ARGV.join('').include?('provider=digital_ocean')) | |
| config.vm.provision 'shell', inline: <<-SHELL | |
| sudo apt-get update |
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
| import pprint | |
| print("Hello, this is a Python script.") | |
| print("Hook['params'] is populated with request parameters") | |
| pprint.pprint(Hook['params']) |
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/python | |
| import os | |
| import sys | |
| import requests | |
| import json | |
| api_base = 'https://api.digitalocean.com/v2' |
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
| root@horizon-rethinkdb-on-1404:~/app# hz serve --bind all --dev --debug | |
| App available at http://0.0.0.0:8181 | |
| debug: RethinkDB stdout: Recursively removing directory /root/app/rethinkdb_data/tmp | |
| debug: RethinkDB stdout: Initializing directory /root/app/rethinkdb_data | |
| info: RethinkDB Running rethinkdb 2.3.2~0trusty (GCC 4.8.2)... | |
| info: RethinkDB Running on Linux 3.13.0-86-generic x86_64 | |
| debug: RethinkDB stdout: Loading data from directory /root/app/rethinkdb_data | |
| error: rethinkdb stderr: warn: Cache size does not leave much memory for server and query overhead (available memory: 845 MB). | |
| info: RethinkDB Listening for intracluster connections on port 40518 | |
| info: RethinkDB Listening for client driver connections on port 35129 |