Skip to content

Instantly share code, notes, and snippets.

Avatar

Stanley Zheng stanzheng

View GitHub Profile
@stanzheng
stanzheng / Caddyfile
Created May 22, 2022 — forked from nileshtrivedi/Caddyfile
Caddy on fly.io as reverse proxy to services on Tailscale network
View Caddyfile
log stdout
errors stdout
auto_https off
http://myapp.fly.dev {
reverse_proxy 100.120.108.62:8000
}
@nileshtrivedi
nileshtrivedi / Caddyfile
Created Nov 14, 2021
Caddy on fly.io as reverse proxy to services on Tailscale network
View Caddyfile
log stdout
errors stdout
auto_https off
http://myapp.fly.dev {
reverse_proxy 100.120.108.62:8000
}
View node_hot_reload.js
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
@stanzheng
stanzheng / cloudSettings
Last active May 25, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-11-15T22:05:25.530Z","extensionVersion":"v3.4.3"}
@agatsoh
agatsoh / python3.7.3_on_MX_Linux_18_1.md
Last active Sep 8, 2020
Install python 3.7 on MX Linux 18.1
View python3.7.3_on_MX_Linux_18_1.md

Installing Python 3.7.3 on MX-linux 18.1

I was following this blog to install python 3.7.3 on my MX-linux 18.1 machine. Step by step procedure is as follows

  1. Install the pre-requisites

sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
 libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev
@ddevault
ddevault / Makefile
Last active Sep 13, 2022
Tiny Wayland compositor
View Makefile
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
View 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) => {
@sursh
sursh / README.md
Last active Sep 27, 2017
Introducing RC Connections
View README.md

RC Connections is a way of connecting with others in the Recurse Center community.

Rooted in the belief that everyone has experience and skills that are valuable to someone else, we have no separate list for mentors and mentees. We are all mentors. We are all mentees. For example, Sasha and Andrew had a phone chat recently where she helped him structure a talk he was working on and he told her about the master’s program he recently finished, as she’s considering doing one herself.

If you know a specific person in RC that you'd like to talk with, then you should probably reach out to them directly! RC Connections is meant to facilitate discussion when it's not obvious that a potential connection should happen.

This service is organized by alumni (currently, Sasha and Andrew). Furthermore, RC Connections is an experiment. We welcome and encourage feedback. Please use the #connections Zulip stream to discuss.

How it works:

  • We’ll start on a ~monthly rhythm
@mosquito
mosquito / README.md
Last active Oct 5, 2022
Add doker-compose as a systemd unit
View README.md

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service