Skip to content

Instantly share code, notes, and snippets.

View csu's full-sized avatar

Christopher Su csu

  • San Francisco, CA
View GitHub Profile
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@miawgogo
miawgogo / README.md
Last active April 22, 2021 15:10 — forked from roelentless/README.md
Countdown. REVISED EDITION!!!!

Countdown. REVISED EDITION!!!!

This is a fork of ruleb's count down that rended one of the else ifs unreachable in his code. Even though he was notified by menny people he never fixed his code so i took it on to... fix 1 line of code. This Fork may expand if i have the time to re-learn coffie and see if any outher code is broken.

The rest of this readme and the html code and scss is still the orginal by ruleb.

Description

Simple Dashing widget to countdown until a certain moment. Flashes the widget when finished.

@masha256
masha256 / README.md
Last active August 3, 2017 08:53
Google Column Chart for Dashing

Description

A Dashing widget to show a Google Visualizations Column Chart on a dashboard.

Installation

Copy the google_column.coffee, google_column.html and google_column.scss file to into /widgets/google_column directory.

Add the following to the dashboard layout file:

@gregschwartz
gregschwartz / README.md
Last active July 28, 2016 17:17
RescueTime widget for Dashing.io

Preview

Description

A widget for Dashing which displays the number of hours you've logged on RescueTime, in one productivity grade. If you want time in multiple grade displayed, use multiple widgets (see example).

RescueTime is a "personal analytics service that shows you how you spend your time" on the computer.

@bfg100k
bfg100k / snapRAID_helper.sh
Last active January 26, 2024 20:22
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) It first calls diff to figure out if the parity info is out of sync.
# 2) If parity info is out of sync, AND the number of deleted files exceed
# X (configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
# the existing parity info)
# 3) If partiy info is out of sync, AND the number of deleted files exceed X
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@lsdr
lsdr / NEATEvolve.lua
Last active August 11, 2018 12:52
MarI/O: the script that learns how to play Mario Bros/Mario Kart
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level,
-- and put a copy in both the Lua folder and the root directory of BizHawk.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@alanhamlett
alanhamlett / requirements.txt
Last active March 21, 2019 00:02
WakaTime's requirements.txt Python dependencies
-e git://github.com/kennethreitz/inbox.py.git@551b4f44b144564504c687cebdb4c543cb8e9adf#egg=inbox
alembic==0.8.3
amqp==1.4.9
anyjson==0.3.3
boto==2.39.0
braintree==3.20.0
cairosvg==1.0.19
celery==3.1.20
document.getElementsByClassName('compose-text-container')[0].onpaste = function (event) {
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
// find pasted image among pasted items
var blob;
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf("image") === 0) {
blob = items[i].getAsFile();
}
}