Docker commands follow a pattern where different verbs represent different lifecycle actions:
docker run
: Creates AND starts a new container from an imagedocker run --name my-container nginx
// Hide everything except the countdown widget | |
document.querySelectorAll('body > *').forEach(el => { | |
if (!el.contains(document.querySelector('#cdt'))) { | |
el.style.display = 'none'; | |
} | |
}); | |
// Hide specific elements we don't want | |
const selector = document.querySelector('#countdown_widget_selector'); | |
if (selector) selector.style.display = 'none'; |
# Note: this is not a fully functioning script! You will need to edit paths and other variables manually and it's adviced to run each command manually one after another | |
# install dependencies | |
# http://www.securitylearn.net/tag/deep-analysis-of-itunes-backup/ | |
sudo ARCHFLAGS='-arch i386 -arch x86_64' easy_install pycrypto | |
sudo easy_install M2crypto construct progressbar | |
# clone the decrypt tool source code | |
# hg stands for mercurial | |
hg clone https://code.google.com/p/iphone-dataprotection/ |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
# Will show you any php packages you've got. make not of that! | |
brew list | grep php | |
# Will uninstall any php packages you may have | |
brew list | grep php | while read x; do brew uninstall --force $x; done | |
# You may need to run this too | |
rm -rf /usr/local/Cellar/php | |
# Clean up Launch Agents | |
rm ~/Library/LaunchAgents/homebrew.mxcl.php* | |
sudo rm /Library/LaunchDaemons/homebrew.mxcl.php* | |
brew untap homebrew/php |
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. | |
[mysqld_safe] | |
socket = /var/run/mysqld/mysqld.sock | |
nice = 0 | |
syslog |
#!/bin/bash | |
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | |
echo $SCRIPTPATH |
/*! | |
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/ | |
* Add css-rules to an existing stylesheet. | |
* | |
* @see http://stackoverflow.com/a/16507264/1250044 | |
* | |
* Copyright (c) 2013 Yannick Albert (http://yckart.com) | |
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php). | |
* 2013/11/23 | |
**/ |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
// Generate unique IDs for use as pseudo-private/protected names. | |
// Similar in concept to | |
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>. | |
// | |
// The goals of this function are twofold: | |
// | |
// * Provide a way to generate a string guaranteed to be unique when compared | |
// to other strings generated by this function. | |
// * Make the string complex enough that it is highly unlikely to be | |
// accidentally duplicated by hand (this is key if you're using `ID` |