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
// The shitty Cloudflare UI does not let you select multiple records to be deleted. | |
// If you have a huge zone file this takes ages to do manually, so I've created this | |
// script to run in the console of your browser. It will delete every single record. | |
setInterval(function () { | |
Array.from(document.querySelectorAll('button')).filter(el => el.innerText.includes('Edit'))[0].click(); | |
setTimeout(function () { Array.from(document.querySelectorAll('button')).filter(el => el.innerHTML.includes('Delete'))[0].click(); }, 2000); | |
setTimeout(function () { Array.from(document.querySelectorAll('button')).filter(el => el.innerHTML.includes('Delete'))[1].click(); }, 5000); | |
}, 8000) |
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
server: | |
http_listen_port: 9080 | |
grpc_listen_port: 0 | |
positions: | |
filename: C:\positions.yaml | |
clients: | |
# - url: http://loki:3100/loki/api/v1/push | |
- url: http://10.192.177.253:3100/loki/api/v1/push |
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
CREATE OR REPLACE FUNCTION distance( | |
lat1 double precision, | |
lon1 double precision, | |
lat2 double precision, | |
lon2 double precision) | |
RETURNS double precision AS | |
$BODY$ | |
DECLARE | |
R integer = 6371e3; -- Meters | |
rad double precision = 0.01745329252; |
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
from time import sleep | |
from subprocess import run, PIPE | |
def fetch(): | |
command = ['curl', 'https://demo.ctf.ninja/challenges/', '-H', 'Cookie: sessionid=*change-me*;'] | |
return run(command, stdout=PIPE).stdout | |
def notify(): | |
command = ['say', 'New challenge!'] | |
return run(command, stdout=PIPE) |
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
from math import sqrt | |
class Page(object): | |
def __init__(self, name): | |
self.name = name | |
self.auth = 1 | |
self.hub = 1 | |
self.incoming_neighbors = [] | |
self.outgoing_neighbors = [] |
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
class Page(object): | |
def __init__(self, name): | |
self.name = name | |
self.auth = 1 | |
self.hub = 1 | |
self.incoming_neighbors = [] | |
self.outgoing_neighbors = [] | |
def points_to(self, other_pages): |
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/sh | |
# Google Drive client | |
DRIVE=/usr/local/bin/drive | |
# What to backup on local disk. | |
backup_files="/Users/michaelmcmillan/Prosjekter" | |
# Where to backup to in Google Drive. | |
dest="xxxxxxxxx" |