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
Pre-deploy function: | |
var preDeployFunction = function (captainAppObj, dockerUpdateObject) { | |
var ports = dockerUpdateObject.EndpointSpec.Ports || []; | |
ports.forEach(function (port) { | |
port.PublishMode = 'host'; | |
}); | |
return Promise.resolve(dockerUpdateObject); | |
}; |
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 | |
if [ "$#" -ne 1 ]; then | |
echo "Example: ${0} [email protected]" | |
exit 1 | |
fi | |
cat ~/.ssh/id_rsa.pub | ssh ${1} "cat >> /etc/dropbear/authorized_keys && chmod 0600 /etc/dropbear/authorized_keys && chmod 0700 /etc/dropbear" |
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
// Place this in your /index.php, modified to your satisfaction. | |
// Hook into the end of dom to extend the F3 template engine to inject `{{ @page_title }}` for landing or `{{ @page_title }} | RETSQL` everywhere | |
// else and set to "Untitled Document" when not present. | |
Bigfoot::instance()->on("end_of_dom", function($dom){ | |
$format = ( Base::instance()->get("PATH") != "/" ) ? '{{@page_title}} | RETSQL' : '{{@page_title}}'; | |
$dom->getElementsByTagName('title')->item(0)->nodeValue = $format; | |
return $dom; | |
}); |
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
Username: 9m3nHcEQ47TO9a19 | |
Password: L4nLj5hNkiWL31JQ |
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
echo -n "User to create: " && read user && \ | |
useradd -m $user && chsh -s /bin/bash $user && \ | |
chr=/websites/$user && mkdir -pv $chr && chown -v root:root $chr && \ | |
mkdir -pv $chr/home/$user && chown -Rv $user:$user $chr/home/$user && chmod -Rv 700 $chr/home/$user && \ | |
usermod -aG sftp-only $user && \ | |
mv $chr/.ssh/ /home/$user |
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 | |
set -e | |
[ "$DEBUG" == 'true' ] && set -x | |
DAEMON=sshd | |
echo "> Starting SSHD" |
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 | |
docker events --filter 'event=start' --filter 'event=stop' | while read event | |
do | |
container_id=`echo $event | sed 's/.*Z\ \(.*\):\ .*/\1/'` | |
echo $container_id |
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
{ | |
"require": { | |
"troydavisson/phrets": "2.*" | |
} | |
} |
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
<?php | |
$raw_content = file_get_contents("NBA_example.txt"); | |
$dom = new DOMDocument; | |
$dom->loadHTML("$raw_content"); | |
$block = $dom->getElementById("oddsGridContainer"); | |
$results = []; | |
$assets = $block->getElementsByTagName('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
$objects = $rets->Search('Property', 'RE_1', '(L_ListingID=1800394)'); | |
$test = get_class_methods($objects); | |
print_r($test); | |
// GIVES: | |
/* | |
Array |