I hereby claim:
- I am davet1985 on github.
- I am davet1985 (https://keybase.io/davet1985) on keybase.
- I have a public key ASDHBeQI8S777X3xcXr7X5sZJGvgoSWIGfz-UDYcUWCRaQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function flatten(object, path, result) { | |
if (!result) { | |
result = {}; | |
} | |
for (let prop in object) { | |
if (typeof object[prop] !== 'object') { | |
result[path ? path + prop : prop] = object[prop]; | |
} else { | |
flatten(object[prop], path ? path + prop + '.' : prop + '.', result); | |
} |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
# check Maven java version | |
mvn -version | |
# echo the java 1.7 location | |
echo $(/usr/libexec/java_home -v 1.7) #/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home | |
# add JAVA_HOME to .mavenrc file | |
# WARNING: THIS WILL OVERWRITE YOUR .mavenrc file | |
echo export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) > ~/.mavenrc |
# If you cannot access git:// from your network, you can globally replace it with https | |
git config --global url."https://".insteadOf git:// |
lsof -i tcp:[port] | |
e.g. | |
lsof -i tcp:9393 |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |