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
printf "Laster opp #{local_file} til #{rest_of_path}..." | |
begin | |
res = RestClient.put(url, File.new(local_file)) | |
unless res.code >= 200 and res.code < 300 | |
raise "Opplasting til Artifactory svarte ikke med HTTP OK, feilmelding var: #{res.message}" | |
end | |
puts "Opplasting vellykket! Status: #{res.code}" | |
rescue => 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
git reset --hard origin/HEAD |
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 | |
HASH="6d1c3b49ec99b098212d357e0d8e6add" | |
URL="http://store.apple.com/no/browse/home/shop_iphone/family/iphone" | |
NEW_HASH=`curl -s $URL | md5 -q` | |
if [[ "${HASH}" == "${NEW_HASH}" ]]; then | |
echo "NOTICE: hasn't changed" | |
else | |
echo "ALERT: [$URL] CHANGED from [$HASH] to [$NEW_HASH]" | |
mail -s "ALERT: [$URL] CHANGED from [$HASH] to [$HASHVALUE] - buy the iPhone 5!!!" my@email.com </dev/null | |
fi |
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
### Keybase proof | |
I hereby claim: | |
* I am janhenrik on github. | |
* I am sirjanhenrik (https://keybase.io/sirjanhenrik) on keybase. | |
* I have a public key ASAiO9kOuwbi1bop_hYVS3Esc3hPtbUEFWxuXcPRQ-713go | |
To claim this, I am signing this object: |
OlderNewer