Skip to content

Instantly share code, notes, and snippets.

View morris821028's full-sized avatar
💭
I may be slow to respond.

Shiang-Yun Yang morris821028

💭
I may be slow to respond.
View GitHub Profile
@ibogun
ibogun / gist:ec0a4005c25df57a1b9d
Last active February 2, 2021 13:26
Installing gcc 4.9 & g++ 4.9 on Ubuntu 12.04 OR Ubuntu 14.04
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
@nikmartin
nikmartin / A: Secure Sessions Howto
Last active April 28, 2024 05:17
Secure sessions with Node.js, Express.js, and NginX as an SSL Proxy
Secure sessions are easy, but not very well documented.
Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy:
The desired configuration for using NginX as an SSL proxy is to offload SSL processing
and to put a hardened web server in front of your Node.js application, like:
[NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT]
Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now.
@scravy
scravy / Makefile
Created February 2, 2013 12:42
AWT started from JNI (does not work, using Mac OS X)
JAVAHOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
swing: swing.c StartAWT.class
gcc -Wall -pedantic --std=c99 swing.c -ljvm \
-L$(JAVAHOME)/jre/lib/server \
-I$(JAVAHOME)/include \
-I$(JAVAHOME)/include/darwin \
-o $@
install_name_tool -add_rpath $(JAVAHOME)/jre/lib/server $@