Use this one instead. https://gist.github.com/bahamat/b1f6511ebdaea510a0f9391c75e2362c
This file contains 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 | |
s=( | |
'#!/usr/bin/env bash' | |
'' | |
's=(' | |
')' | |
'' | |
'q=$(printf "\x27")' | |
'for ((i = 0; i < 3; i++ )); do' |
This file contains 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 node | |
var util = require("util"); | |
var source = [ | |
'#!/usr/bin/env node', | |
'', | |
'var util = require("util");', | |
'', | |
'var source = [', |
This file contains 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
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
This file contains 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 | |
if (( UID > 0 )); then | |
echo "You must elevate privileges." | |
exit 1 | |
fi | |
usbkey_status=$(/opt/smartdc/bin/sdc-usbkey status) | |
passwd_file=/mnt/usbkey/private/root.password.$1 |
This file contains 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 | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# Copyright (c) 2015, Brian Bennett <bahamat@digitalelf.net> | |
cn=$1; shift | |
action=$1; shift |
This file contains 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 | |
# This little hack-job will grab credentials from a running openvpn process in Linux | |
# Keep in mind this won't work if the user used the --auth-nocache flag | |
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done | |
echo "Your credentials should be listed below as username/password" | |
strings *.dump | grep -B2 KnOQ | grep -v KnOQ | |
rm *.dump --force |
Download each file using the Raw link, or clone this gist then run the following commands:
svccfg import cf-serverd.xml
svccfg import cf-monitord.xml
svcdfg import cf-execd.xml
In your policy, cfe_internal/update/update_processes.cf
should be updated accordingly to enable the SMF services instead of executing commands directly.
This file contains 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
log_format bunyan '{' | |
'"name": "nginx/$nginx_version",' | |
'"hostname": "$hostname",' | |
'"pid": "$pid",' | |
'"level": 30,' | |
'"time": "$time_iso8601",' | |
'"v": 0,' | |
'"msg": "access",' | |
'"remoteAddress": "$remote_addr",' |
This error is somewhat ambiguious because there is seemingly no indication which resource is exhausted.
Triton chooses compute nodes with a subcomponent called sdc-designation (also refered to as , DAPI). The full DAPI log for a provision job is embedded in the CNAPI log file and can be extracted with the workflow job uuid.
Note: The script below is no longer necessary because cnapi
now includes /opt/smartdc/cnapi/bin/alloc-reasons.sh
which does the same thing.
#!/bin/bash