- Add your coinMarketCap private key
YOUR_PRIVATE_KEY
- Use
=$COUNT_CELL*coingecko($SYMBOL_CELL)
in your sheet
View certbot.sh
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
sudo certbot -d "*.example.com" --manual --preferred-challenges dns certonly |
View retry.sh
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
#!/usr/bin/env bash | |
function retry { | |
local retries=$1 | |
shift | |
local count=0 | |
until "$@"; do | |
exit=$? | |
wait=$((2 ** $count)) |
View README.md
View fake.go
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
) | |
func handleConnection(conn net.Conn) { |
View coinMarketCap.gs
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
/* | |
* use =coinMarketCap('ETH') in your sheet | |
*/ | |
function coinMarketCap(symbol) { | |
const url = `https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=${symbol}&convert=EUR` | |
const headers = { | |
"X-CMC_PRO_API_KEY": 'API_KEY from https://pro.coinmarketcap.com/account' | |
}; |
View Squash.sh
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
git reset (git merge-base main (git branch --show-current)) | |
git push --force |
View cache-warmer.py
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
#!/usr/bin/env python3 | |
""" | |
Warm the caches of your website by crawling each page or sitemap index defined in sitemap.xml. | |
To use, download this file and make it executable. Then run: | |
./cache-warmer.py --threads 4 --interval 10 --file https://example.com/sitemap.xml -v | |
./cache-warmer.py --threads 4 --interval 10 --file /data/web/public/sitemap.xml -v | |
""" | |
import argparse | |
from multiprocessing.pool import ThreadPool | |
import os.path |
View stop-terraform.sh
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
#Gently: | |
ps -ef | grep terraform | grep -v grep | awk '{print $2}' | xargs -n 1 kill | |
#Forcefully: | |
ps -ef | grep terraform | grep -v grep | awk '{print $2}' | xargs -n 1 kill -9 |
View lussh
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/bash | |
# make sure to run this with /bin/bash, NOT /bin/sh | |
echo | |
echo This script will help you setup ssh public key authentication. | |
host=dummy |
View killfolder.groovy
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 hudson.model.* | |
import jenkins.model.Jenkins | |
for (job in Jenkins.instance.items) { | |
if( job.getFullName().contains('my folder') ){ | |
stopJobs(job) | |
} | |
} |
NewerOlder