This file contains hidden or 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
#!/usr/bin/env ruby | |
# Version 00002 | |
# Added notify script | |
# Version 00001 | |
# Initial commit | |
require 'rubygems' |
This file contains hidden or 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 | |
# Run this script as root ie: | |
# sudo -s | |
# bash <(wget -q -O - https://raw.github.com/gist/3089611) | |
bold=`tput bold`; | |
normal=`tput sgr0`; | |
# Setup the timezone |
This file contains hidden or 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
# Unmount the Disks | |
diskutil unmount /dev/disk1s1 | |
diskutil unmount /dev/disk2s1; | |
diskutil unmount /dev/disk3s1; | |
diskutil unmount /dev/disk4s1; | |
diskutil unmount /dev/disk5s1; | |
diskutil unmount /dev/disk6s1; | |
diskutil unmount /dev/disk7s1; | |
diskutil unmount /dev/disk8s1; |
This file contains hidden or 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
$ curl -H 'Content-Type: application/json' \ | |
-H 'Accept: application/json' \ | |
-d '{"email":"[email protected]","password":"correctpassword"}' \ | |
-i https://a.ninja.is/signin | json | |
HTTP/1.1 200 OK | |
Content-Type: application/json; charset=utf-8 | |
Date: Thu, 02 Aug 2012 01:05:59 GMT | |
X-Powered-By: Express | |
Content-Length: 124 |
This file contains hidden or 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
{ | |
"result": 1, | |
"error": null, | |
"id": 0, | |
"data": { | |
"1712BB000774_3_0_0": { | |
"vid": "0", | |
"gid": "3", | |
"did": "0", | |
"meta": { |
This file contains hidden or 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
curl "https://api.ninja.is/rest/v0/devices\?user_access_token\=-XXXX-XXXX-XXXX-XXXXXX-XXXXXXX" |
This file contains hidden or 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
curl "https://api.ninja.is/rest/v0/device/1012BB013302_3_0_9/heartbeat?user_access_token=XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX" |
This file contains hidden or 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
{"result":1,"error":null,"id":0,"data":{"G":"3","V":0,"D":9,"DA":24.1,"GUID":"1012BB013302_3_0_9","timestamp":1350005477869}} |
This file contains hidden or 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
curl "https://api.ninja.is/rest/v0/device/1012BB013302_3_0_9/data?user_access_token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" |
This file contains hidden or 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
{ | |
"result": 1, | |
"error": null, | |
"id": 0, | |
"data": [ | |
{ | |
"t": "2012-10-12T01:46:00.000+0000", | |
"v": 24.1 | |
}, | |
{ |