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
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins |
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
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins |
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 | |
# <UDF name="ssh_key" default="" label="Public SSH Key for user" /> | |
# <UDF name="username" default="" label="default username" /> | |
# <UDF name="hostname" default="" label="default username" /> | |
function logit { | |
# Simple logging function that prepends an easy-to-find marker '=> ' and a timestamp to a message | |
TIMESTAMP=$(date -u +'%m/%d %H:%M:%S') | |
MSG="=> ${TIMESTAMP} $1" |
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
"""http://stackoverflow.com/questions/12700893/how-to-check-if-a-string-is-a-valid-python-identifier-including-keyword-check""" | |
import keyword | |
import tokenize | |
def isidentifier(ident): | |
"""Determines, if string is valid Python identifier.""" | |
# Smoke test — if it's not string, then it's not identifier, but we don't | |
# want to just silence exception. It's better to fail fast. |
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
"""http://stackoverflow.com/questions/12700893/how-to-check-if-a-string-is-a-valid-python-identifier-including-keyword-check""" | |
import ast | |
def isidentifier(ident): | |
"""Determines, if string is valid Python identifier.""" | |
# Smoke test — if it's not string, then it's not identifier, but we don't | |
# want to just silence exception. It's better to fail fast. | |
if not isinstance(ident, str): | |
raise TypeError('expected str, but got {!r}'.format(type(ident))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
first_loop = true | |
loop do | |
# Trap ^C aka interrupt signal | |
Signal.trap("INT") { | |
puts "\nGoodbye!" | |
exit | |
} | |
[ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// This example shows how to render pages that perform AJAX calls | |
// upon page load. | |
// | |
// Instead of waiting a fixed amount of time before doing the render, | |
// we are keeping track of every resource that is loaded. | |
// | |
// Once all resources are loaded, we wait a small amount of time | |
// (resourceWait) in case these resources load other resources. | |
// | |
// The page is rendered after a maximum amount of time (maxRenderTime) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.