https://www.icloud.com/shortcuts/fda366835eb6421aa1d9717c515a9d75
This file contains hidden or 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
const puppeteer = require("puppeteer"); | |
async function getAustinPowerOutages(endpoint) { | |
try { | |
const res = await fetch(endpoint); | |
if (!res.ok) { | |
throw new Error(`Austin Energy ${endpoint} is not available.`); | |
} | |
const data = await res.json(); | |
return data; |
This file contains hidden or 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
Script Info NEXT DATA iOS |
This file contains hidden or 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
function client(endpoint, { body, ...customConfig } = {}) { | |
const headers = { 'Content-Type': 'application/json' }; | |
const config = { | |
method: body ? 'POST' : 'GET', | |
...customConfig, | |
headers: { | |
...headers, | |
...customConfig.headers, | |
}, | |
}; |
All the answers I saw here were valid, but there is a much cleaner way to clone a repository and to pull all the branches at once.
When you clone a repository, all the information of the branches is actually downloaded, but the branches are hidden. With the command
git branch -a
you can show all the branches of the repository, and with the command
This file contains hidden or 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
# put in .zshrc | |
# cd into the folder you want to put your project in | |
# scaffold [PROJECT NAME] | |
scaffold() { | |
mkdir $1 && cd $1 && touch index.html && mkdir assets && mkdir assets/js && mkdir assets/css && touch assets/js/script.js && touch assets/css/style.css && echo '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
This file contains hidden or 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
#!/usr/bin/env python | |
# Author: @gubatron | |
# License: MIT License, Copyright 2019 | |
import os | |
import sys | |
if __name__ == '__main__': | |
cmd_get_process_list = 'ps -ef --sort=start_time | grep ssh-agent | grep -v grep' | |
output = os.popen(cmd_get_process_list) | |
lines = output.read().split("\n") |
This file contains hidden or 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
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,node | |
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,node | |
### macOS ### | |
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r |
This file contains hidden or 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
source ${ZDOTDIR-$HOME}/.zsh/create_html_repo.zsh | |
export GH_TOKEN=<TOKEN> | |
export REPO_NAME="$USER-automated-repo" | |
# create_html_repo my-cool-project | |
create_html_repo() { | |
cd ~/Desktop && mkdir $1 && cd $1 && touch index.html && mkdir assets && mkdir assets/js && mkdir assets/css && touch assets/js/script.js && touch assets/css/style.css && echo '<!DOCTYPE html> |
This file contains hidden or 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
export GH_TOKEN="<YOUR TOKEN>" | |
export REPO_NAME="$USER-automated-repo" | |
create_repo() { | |
echo default $REPO_NAME | |
vared -c -p 'Please enter a repo name: ' REPO_NAME | |
echo new $REPO_NAME | |
curl \ | |
-X POST \ |
NewerOlder