_Assumes you are on OSX (sorry, I didn't have time to test it on linux)
- PDFKit for Mac 10.11
brew install imagemagick
brew install gs
./watermark.sh mydoc.pdf < recipients.txt
/** | |
* Luhn Class is an implementation of the Luhn algorithm that checks validity of a credit card number. | |
* | |
* @author <a href="http://www.chriswareham.demon.co.uk/software/Luhn.java">Chris Wareham</a> | |
* @version Checks whether a string of digits is a valid credit card number according to the Luhn algorithm. 1. Starting with the second to last digit and | |
* moving left, double the value of all the alternating digits. For any digits that thus become 10 or more, add their digits together. For example, | |
* 1111 becomes 2121, while 8763 becomes 7733 (from (1+6)7(1+2)3). 2. Add all these digits together. For example, 1111 becomes 2121, then 2+1+2+1 is | |
* 6; while 8763 becomes 7733, then 7+7+3+3 is 20. 3. If the total ends in 0 (put another way, if the total modulus 10 is 0), then the number is valid | |
* according to the Luhn formula, else it is not valid. So, 1111 is not valid (as shown above, it comes out to 6), while 8763 is valid (as shown | |
* above, it comes ou |
# This must be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches | |
git branch --merged master | grep -v 'master$' | xargs git branch -d | |
# Show remote fully merged branches | |
echo "The following remote branches are fully merged and will be removed:" | |
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' |
_Assumes you are on OSX (sorry, I didn't have time to test it on linux)
brew install imagemagick
brew install gs
./watermark.sh mydoc.pdf < recipients.txt
let sources = { | |
'default-src': ['\'self\''], | |
'script-src': ['\'self\'','https://*.myexternalcdn.com'], | |
'frame-src': ['https://someexternalframesource.com'], | |
'img-src': ['\'self\'', 'https:', 'data:'], | |
'style-src': ['\'self\'', 'https:'], | |
'font-src': ['\'self\'', 'https:'], | |
'connect-src': ['\'self\''], | |
} |
### Keybase proof | |
I hereby claim: | |
* I am mdp on github. | |
* I am mdp (https://keybase.io/mdp) on keybase. | |
* I have a public key whose fingerprint is 3977 96B0 0D37 D95B 3FDC F12F 32FC E8AB 7513 4EF9 | |
To claim this, I am signing this object: |
package com.dotp; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.KeyEvent; | |
import com.facebook.react.LifecycleState; | |
import com.facebook.react.ReactInstanceManager; |
// http://www.shamrock-software.eu/erlang.htm | |
// Erlang B Equation | |
// Javascript: Percentage of busy | |
// calls with a=traffic and n lines | |
function erl(a,n) | |
{ u=1; | |
for(i=1;i<=n;i++) u+=pow(a,i)/fak(i); | |
return((pow(a,n)/fak(n))/u+0.005)*100 | |
} | |
function fak(i) // Get factorial of i |
#!/bin/bash | |
# Usage: ./env-to-ssm.sh prefix envfile | |
# Ex: ./env-to-ssm.sh prod.app .env | |
AWS_SSM_PREFIX=$1 | |
ENV_FILE=$2 | |
cat aws/.env | grep -v ^# | grep -v -e '^$' | while read line |
#!/bin/bash | |
arg=$1 | |
host=$2 | |
OVPN_DATA="ovpn-data" | |
set -x | |
if [ "$arg" == "setup" ]; then |