Skip to content

Instantly share code, notes, and snippets.

View flopana's full-sized avatar

flopana

  • 02:32 (UTC +02:00)
View GitHub Profile
@doutv
doutv / checkout.yml
Last active April 18, 2024 13:19
GitHub Actions Pull Private Git Submodule
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone main repository
uses: actions/checkout@v4
- name: Add SSH private keys for submodule repositories
uses: webfactory/ssh-agent@v0.9.0
@ardislu
ardislu / archive-dns-issue.md
Last active March 17, 2024 21:02
Reference note about archive.today and Cloudflare DNS.

Problem

If you use Cloudflare's DNS (1.1.1.1), then the popular web archive archive.today (and the related sites archive.ph, archive.is, archive.li, archive.vn, archive.md, and archive.fo) will either fail to resolve, or show an infinite CAPTCHA loop. If it does resolve when you're on Cloudflare's DNS, you may have the domain locally cached.

Solution

Fix this problem by:

  • Configuring dnsmasq on your local DNS server to use an alternate DNS server for archive.today (see comment from @joshenders below), or
  • Connecting to a VPN before connecting to archive.today (only works if the VPN uses different DNS servers), or

List all regions

$ akash query provider list --limit 1000 -o json | jq -r '.providers[] | (.attributes[] | select(.key == "region") | .value)' | sort | uniq -c | sort -n
      1 ap-northeast-1
      1 ap-southeast
      1 australia-east-akash-provider
      1 Chicago
      1 cz-prague
      1 cz-prague2
@danharper
danharper / background.js
Last active June 29, 2024 19:32
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@idev247
idev247 / .bashrc
Created February 12, 2011 03:19
~/.bashrc tar extracting made easy
# found here http://ubuntuforums.org/showthread.php?t=1116012
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 && cd $(basename "$1" .tar.bz2) ;;
*.tar.gz) tar xvzf $1 && cd $(basename "$1" .tar.gz) ;;
*.tar.xz) tar Jxvf $1 && cd $(basename "$1" .tar.xz) ;;
*.bz2) bunzip2 $1 && cd $(basename "$1" /bz2) ;;
*.rar) unrar x $1 && cd $(basename "$1" .rar) ;;