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
# List Cloudflare zones and copy the zone do you want to update | |
curl -X GET "https://api.cloudflare.com/client/v4/zones?name=example.com&status=active&page=1&per_page=20&order=status&direction=desc&match=all" \ | |
-H "X-Auth-Email: cloudflere_email" \ | |
-H "X-Auth-Key: cloudflare_apikey" \ | |
-H "Content-Type: application/json" | |
# List DNS Records paste the zone from previous command | |
curl -X GET "https://api.cloudflare.com/client/v4/zones/paste_here_zone_id/dns_records?type=A&page=1&per_page=20&order=type&direction=desc&match=all" \ | |
-H "X-Auth-Email: cloudflere_email" \ | |
-H "X-Auth-Key: cloudflare_apikey" \ |
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 list = $$('span.a-color-price.a-size-base'); | |
var total = 0; | |
for (i = 0; i < list.length; i++) { | |
var price = parseFloat(list[i].innerHTML.replace('EUR', '') .replace(',', '.')); | |
total += price; | |
} | |
console.log("Total amount of items in wish list = ", total, "€"); |
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
/* Solarized Dark | |
For use with Jekyll and Pygments | |
http://ethanschoonover.com/solarized | |
SOLARIZED HEX ROLE | |
--------- -------- ------------------------------------------ | |
base03 #002b36 background | |
base01 #586e75 comments / secondary content |
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
IMPORTANT | |
Please duplicate this radar for a Safari fix! | |
This will clean up a 50-line workaround. | |
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072) | |
////////////////////////////////////////////////////////////////////////////// | |
(Now available as a standalone repo.) |
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
import time | |
import socket | |
def collect_metric(name, value, timestamp): | |
sock = socket.socket() | |
sock.connect( ("localhost", 2003) ) | |
sock.send("%s %d %d\n" % (name, value, timestamp)) | |
sock.close() | |
def now(): | |
return int(time.time()) |