adduser deploy
passwd deploy
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
var Log = { | |
_levelInt: function levelInt() { | |
return this._levels.indexOf(this.level); | |
}, | |
_intForLevel: function intForLevel(level) { | |
return this._levels.indexOf(level); | |
}, | |
_logForLevel: function logForLevel() { | |
if (!console) { return; } |
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
<html> | |
<body> | |
<title>Image Preloading Test</title> | |
<meta charset="utf-8" /> | |
</body> | |
<div id="target">Loading...</div> | |
<button id="load">start</button> | |
<script> |
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 UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var execButton: UIButton! | |
var username: String? = nil | |
var password: String? = nil | |
lazy var conn: NSURLSession = { |
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
cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.bkup | |
cat /etc/haproxy/haproxy.cfg | sed 's/ssl-default-bind-options no-sslv3 no-tlsv10/ssl-default-bind-options no-sslv3/' > /etc/haproxy/haproxy.cfg | |
/etc/init.d/haproxy restart |
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
tell application "Safari" | |
set topWindows to every window whose name is not "" | |
set numWindows to the number of topWindows | |
set didFind to false | |
set targetUrl to "http://localhost:3000/" | |
repeat with x from 1 to numWindows | |
set numTabs to the number of tabs in window x | |
repeat with y from 1 to numTabs | |
set tabUrl to the URL of tab y of window x |
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
function hideNodes(matcher) { | |
var fileNodes = document.querySelectorAll("#files .file"); | |
var indeciesToHide = []; | |
var tester = (typeof matcher === "string") ? new RegExp(matcher) : matcher; | |
var fileHeader; | |
var filePath; | |
for (var i=0; i < fileNodes.length; i++) { | |
fileHeader = null; | |
filePath = null; |
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 | |
MAX_NUM_BACKUPS=10 | |
DB_LOCATION=/root/dropbox_uploader.sh | |
DB_CONFIG=/root/.dropbox_uploader | |
BACKUP_FILENAME=ss_ranch_bkup | |
BKP_DIRS="/home/docker/rancher /home/docker/nginx" | |
EXCLUDE_DIRS="/home/docker/nginx/ssl" | |
TMP_DIR="/tmp/" |
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
tell application "System Events" to tell process "Mail" | |
set mainWindow to a reference to the first window | |
set rootSplitter to a reference to the first splitter group of the mainWindow | |
set firstSplitter to a reference to the last splitter group of the rootSplitter | |
set scrollArea to a reference to the last scroll area of the firstSplitter | |
set scrollGroup to a reference to the first group of the scrollArea | |
if number of groups of the scrollGroup is greater than 1 then | |
set maybeRemoteContentGroup to a reference to the first group of the scrollGroup | |
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
/** | |
* Loads images for a section of dom tiles. Loads the image in the | |
* background and then removes loading indicators once loaded. | |
* | |
* Takes an array of dom nodes, a single dom node, or a css selector. | |
*/ | |
function loadTileImages(imageEls) { | |
if (typeof imageEls !== 'string' && !Array.isArray(imageEls)) { | |
imageEls = [imageEls]; | |
} |
NewerOlder