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 | |
domain="example.com" | |
aname="subdomain" | |
key="your_key" | |
secret="your_secret" | |
myip=`curl -s -X GET http://api.ipify.org?format=json | jq -r .ip` | |
recip=`curl -s -X GET "https://api.godaddy.com/v1/domains/$domain/records/A/$aname" -H "accept: application/json" -H "Authorization: sso-key $key:$secret" | jq -r .[0].data` |
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
module['exports'] = function easter(hook) { | |
var year = hook.params.year; | |
hook.debug("i am going to calculate the date of Easter for " + year); | |
// using the "Meeus/Jones/Butcher" algorithm | |
var a = year % 19; | |
var b = Math.floor(year/100); | |
var c = year % 100; | |
var d = Math.floor(b/4); |
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 Point constructor. Polygon uses this object, but it is | |
* just a really simple set of x and y coordinates. | |
*/ | |
function Point(px, py) { | |
this.x = px; | |
this.y = py; | |
} | |
/* |
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
var MAX_ROW = 30; | |
var BLANK = " "; | |
var BLACK = 0; | |
var RED = 1; | |
var GREEN = 2; | |
var YELLOW = 3; | |
var BLUE = 4; | |
var MAGENTA = 5; | |
var CYAN = 6; |