Skip to content

Instantly share code, notes, and snippets.

View daveenguyen's full-sized avatar

Davee Nguyen daveenguyen

View GitHub Profile
@daveenguyen
daveenguyen / start.sh
Created October 19, 2015 09:23
Script to start each folder in the current directory as an nginx hosted static site. The virtual host will be [folder's name].example.com. Just modify the script to match your need.
#!/bin/bash
for d in */; do
docker run \
-v ${PWD}/${d}:/usr/share/nginx/html:ro \
-e VIRTUAL_HOST=${d::-1}.example.com \
-d nginx
done
@daveenguyen
daveenguyen / StartSSL.md
Created October 13, 2015 07:02 — forked from mgedmin/StartSSL.md
Free StartSSL.com SSL certificate HOWTO

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'
@daveenguyen
daveenguyen / README.md
Created September 28, 2015 08:32
List globally installed npm packages
@daveenguyen
daveenguyen / tether.sh
Last active August 29, 2015 14:07
enable tethering on nex5 with tmo
# in shell just run this command. no root required
settings put global tether_dun_required 0
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FHISH_SHELL_VERSION=2.1.0
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@daveenguyen
daveenguyen / veggie.php
Created January 20, 2014 02:44
Wrote this to manually pass my verilog code through geshi. When using easybook, by default long code would crash the markdown parser due to geshi outputting everything into one line.
#!/usr/bin/env php
<?php
include("geshi/geshi.php");
$buffy = "";
$f = fopen( 'php://stdin', 'r' );
while( $line = fgets( $f ) ) {
$buffy .= $line;
}
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
@daveenguyen
daveenguyen / CheckInput.cs
Last active February 19, 2021 23:51
Just using this to see where the buttons are mapped to on my controller
using UnityEngine;
using System.Collections;
public class CheckInput : MonoBehaviour {
void Update(){
if ( Input.GetKeyDown ( KeyCode.JoystickButton0 )){Debug.Log("JoystickButton0");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton1 )){Debug.Log("JoystickButton1");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton2 )){Debug.Log("JoystickButton2");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton3 )){Debug.Log("JoystickButton3");}