Skip to content

Instantly share code, notes, and snippets.

View qwo's full-sized avatar

Stanley Zheng qwo

View GitHub Profile
@qwo
qwo / github-search-cheatsheet.md
Created March 5, 2024 20:55 — forked from bonniss/github-search-cheatsheet.md
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

@qwo
qwo / github-search-cheatsheet.md
Created March 5, 2024 20:55 — forked from bonniss/github-search-cheatsheet.md
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

@qwo
qwo / pi-hole-workshop-instructions-using-Rpi.md
Created December 27, 2022 17:33 — forked from nkavadias/pi-hole-workshop-instructions-using-Rpi.md
Raspberry Pi instructions for Pi-hole setup
@qwo
qwo / wget.sh
Created November 30, 2022 02:07 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@qwo
qwo / wget.sh
Created November 30, 2022 02:07 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@qwo
qwo / Caddyfile
Created May 22, 2022 14:39 — forked from nileshtrivedi/Caddyfile
Caddy on fly.io as reverse proxy to services on Tailscale network
log stdout
errors stdout
auto_https off
http://myapp.fly.dev {
reverse_proxy 100.120.108.62:8000
}
@qwo
qwo / Caddyfile
Created May 22, 2022 14:39 — forked from nileshtrivedi/Caddyfile
Caddy on fly.io as reverse proxy to services on Tailscale network
log stdout
errors stdout
auto_https off
http://myapp.fly.dev {
reverse_proxy 100.120.108.62:8000
}
@qwo
qwo / main.c
Created May 13, 2020 03:51 — forked from ColorfulCodes/main.c
This is the mt3620 blinky
#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <applibs/storage.h>
#include <applibs/log.h>
#include <applibs/gpio.h>
@qwo
qwo / hb_all_books_dl.js
Last active August 19, 2018 19:36 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
Updated: Credit @jmerle
*/
const commands = [];
document.querySelectorAll('.row').forEach(row => {
const bookTitle = row.dataset.humanName;
@qwo
qwo / rabbitasyncawait.js
Created January 15, 2018 16:46 — forked from emilioriosvz/rabbitasyncawait.js
rabbitmq async await
var amqp = require('amqplib')
var open = require('amqplib').connect('amqp://localhost');
const connect = (url = 'amqp://localhost') => {
return new Promise((resolve, reject) => {
amqp.connect(url)
.then(conn => resolve(conn))
.catch(err => reject(err))
})