Skip to content

Instantly share code, notes, and snippets.

<php echo "hello" ?>
@davidakerr
davidakerr / github_backup.js
Last active August 13, 2021 01:21
NodeJs Github backup script (All Repositories)
const https = require("https");
const fs = require("fs");
const { exec } = require("child_process");
const outputDir = "repos";
const token = "PERSONAL_ACCESS_TOKEN";
const options = {
method: "GET",
hostname: "api.github.com",
@davidakerr
davidakerr / update-dns.sh
Created August 12, 2021 16:29 — forked from christr/update-dns.sh
Linode dynamic DNS updating script
#!/bin/bash
# Modified by Chris Richardson (https://github.com/christr and https://twitter.com/christr77) on 09/20/2020
# Previous versions of this script don't work because they hadn't been updated since 2012. There are now more steps involved to set this up.
# This script update is based on information found here: https://developers.linode.com/api/v4/domains-domain-id-records-record-id/#put
# You first must find out the domain ID and resource ID numbers. In order to do this follow the steps below.
# 1. Create a Linode API Key through your account profile at https://cloud.linode.com/dashboard. Give it rights to read/write to domains only.
# 2. From a shell run the following command: LINODE_API_KEY=[insert API key from step 1 here]
# 3. Run the following command to get the domain ID number for the domain you want to manage: curl -H "Authorization: Bearer $LINODE_API_KEY" https://api.linode.com/v4/domains/