cd ~/Desktop
mkdir wget-build
cd wget-build
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
authority letsencrypt { | |
api url "https://acme-v02.api.letsencrypt.org/directory" | |
account key "/etc/acme/letsencrypt-privkey.pem" | |
} | |
# example.net | |
domain example.net { | |
alternative names { www.example.net } | |
domain key "/etc/ssl/private/example.net.key" | |
domain certificate "/etc/ssl/example.net.crt" |
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
maxUnsigned = 0x1FFFFFFF | |
bitsInUnsigned = int(29) | |
seventyFivePercent = int(22) | |
twelvePercent = int(4) | |
highBits = 0x1E000000 | |
lowBits = 0x01FFFFFF | |
def generateRegCode(userName): | |
reg = "" | |
sn = "" |
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
export default { | |
get(page) { | |
return this.all().find(p => p.page == page) | |
}, | |
all() { | |
return [ | |
{ | |
page: 'signup', | |
title: 'Sign up', | |
subtitle: 'Please enter your name, email and set a password.', |
I hereby claim:
- I am morgant on github.
- I am morgant (https://keybase.io/morgant) on keybase.
- I have a public key ASBYIZBmTq0sdXPwOvb5jluT37dE3napZNsnO5rRq12i1Ao
To claim this, I am signing this object:
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
# dump to another server | |
mysqldump -u MYSQL_USERNAME -p YOUR_DATABASE | gzip -c | ssh USERNAME@YOUR_TO_HOST 'cat > ~/dump.sql.gz' | |
# dump from another server | |
ssh USERNAME@YOUR_TO_HOST 'mysqldump -u MYSQL_USERNAME -pPASSWORD YOUR_DATABASE | gzip -c' > ~/dump.sql.gz |
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
# | |
# This is the simplest and cleanest way I've come up with for securely compressing (gzip, in this example) & encrypting data to disk with OpenSSL from a bash script without exposing the password to inspection of process or environment variable using `ps` and the likes. Naturally, `cat` is just used as an example so the data can come from anywhere. If the compressed data is to be sent via email instead of written to disk, don't use '-out' and use '-a' to base64 encode the compressed data. | |
# | |
# References: | |
# http://www.madboa.com/geek/openssl/#encrypt-simple | |
# http://unix.stackexchange.com/questions/29111/safe-way-to-pass-password-for-1-programs-in-bash#answer-29186 | |
# http://stackoverflow.com/questions/6607675/shell-script-password-security-of-command-line-parameters/6607773#6607773 | |
# https://gist.github.com/philfreo/2321650 | |
cat "$file" | gzip -c | openssl enc -e -salt -aes-256-cbc -pass fd:3 -out "$file.gz.enc" 3<<<"$password" |
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
function getFnName(fn) { | |
var f = typeof fn == 'function'; | |
var s = f && ((fn.name && ['', fn.name]) || fn.toString().match(/function ([^\(]+)/)); | |
return (!f && 'not a function') || (s && s[1] || 'anonymous'); | |
} | |
function currentFnName() { | |
try { | |
return getFnName(arguments.caller); | |
} catch(e) { |
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
Mirroring homepage.mac.com sites to mirrors.unna.org: | |
1) Use `wget` to pull down a copy of the site. If pulling down a single file & all its prerequisites, use the following: | |
/usr/local/bin/wget -p --mirror -k -t 30 -w 5 -e robots=off -o homepage.mac.com-splorp.$(date +%Y-%m-%d-%H%M).log "http://homepage.mac.com/splorp/PhotoAlbum3.html" & | |
Alternatively, if pulling down an entire directory, use the following (Note: _make sure_ you include the trailing slash on the directory name!): | |
/usr/local/bin/wget --mirror -k -t 30 -w 5 -e robots=off -o homepage.mac.com-splorp.$(date +%Y-%m-%d-%H%M).log "http://homepage.mac.com/splorp/" & |
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
/** Send a message to a method in a frame by name with an array of parameters | |
* | |
* @param rcvr [in] レシーバ | |
* @param frame [in] Frame | |
* @param message [in] Message | |
* @param params [in] Parameters | |
* | |
* @return Return value | |
*/ | |
newtRef NsPerform(newtRefArg rcvr, newtRefArg frame, newtRefArg message, newtRefArg params) |
NewerOlder