Skip to content

Instantly share code, notes, and snippets.

View JorgeGT's full-sized avatar

Jorge Garcia JorgeGT

View GitHub Profile
@v1ct0rv
v1ct0rv / update.sh
Created August 28, 2015 21:14
Update clodflare record from command line
# 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" \
@elkhadiy
elkhadiy / gist:1d9cf954825b6dabb5c5
Last active August 29, 2015 14:06
Get total amount of an amazon wish list for yurop people
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, "€");
@qguv
qguv / solarized-dark.css
Last active April 5, 2021 04:50 — forked from nicolashery/solarized-dark.css
Solarized theme for Jekyll, updated to reflect toned-down line numbers
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
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.)
@codification
codification / graphite-client.py
Last active April 29, 2019 17:21
Graphite client in python
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())