Skip to content

Instantly share code, notes, and snippets.

View haohcraft's full-sized avatar

Hao haohcraft

View GitHub Profile
@haohcraft
haohcraft / nginx.conf
Last active November 5, 2015 15:20 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers
@haohcraft
haohcraft / nginx.conf
Last active November 5, 2015 14:12
Basic Nginx config
server{
listen 80;
server_name www.domain.com domain.com;
access_log /home/hao/sites/nginx_log/domain/accesss.log;
error_log /home/hao/sites/nginx_log/screendomain/error.log;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
@haohcraft
haohcraft / gist_scss.md
Created July 22, 2015 15:00
SCSS Resources

##SCSS Resource

#####normalize.scss

here

#####SASS Mixins

here

@haohcraft
haohcraft / gist:f1e1926f3b26c5b5ae88
Last active November 3, 2015 14:46
Basic Environment Setup

##Environment Setup

  1. Smile

  2. NodeJS install

2.1 Install NVM In the terminal, run curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash

2.2 reload .profile or .bash_profile

@haohcraft
haohcraft / gist:6a7c576bd366bd7802a4
Last active August 29, 2015 14:23
Server Setup Basic

####Create a New User

  1. add adduser hao
  2. set root privilege gpasswd -a hao sudo
  3. switch user su - root

####Add pulic key ssh-keygen

####Install g++

#####add IP to a hostname

  1. sudo vi /etc/hosts
  2. add 202.324.44.1 example.me

#####keyboard to control your screens spectacel

http://www.sitepoint.com/8-tips-help-get-best-sass/