Skip to content

Instantly share code, notes, and snippets.

View qwo's full-sized avatar

Stanley Zheng qwo

View GitHub Profile
@qwo
qwo / Fork-This-Talk.html
Last active October 24, 2017 17:23 — forked from ryanj/Fork-This-Talk.html
ATO2017 Lightning Talks - Revealjs presentation hacks with gist-reveal - http://bit.ly/ato-reveal
<section>
<h2><span class='fragment fade-right'>ryanj</span> <span class='fragment fade-up'>@</span> <span class='fragment fade-left'>red hat</span></h2>
<h1 class='fragment fade-up'>RevealJS Presentation Hacks</h1>
<h4 class='fragment fade-up'><a href="http://gist-reveal.it/57830ddbac95a9b3a6d464a03572cc74">http://gist-reveal.it/57830ddbac95a9b3a6d464a03572cc74</a></h4>
</section>
<section data-markdown>
## reveal.js
https://github.com/hakimel/reveal.js#revealjs--
@qwo
qwo / magic.js
Created December 29, 2017 12:32 — forked from Yuffster/magic.js
class Magic {
constructor(fn, a) {
this.__chain = [[fn, a]];
}
get(t, a) {
if (a == "✨✨MAGIC✨✨") return true;
if (a == "resolve") {
return () => Magic.chain(this.__chain);
}
return (...b) => {
@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))
})
@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 / 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 / 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 / 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 / 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