Skip to content

Instantly share code, notes, and snippets.

View chiehwen's full-sized avatar

Chuck Yang chiehwen

View GitHub Profile
@chiehwen
chiehwen / site.conf
Last active August 29, 2015 14:00
Nginx site configuration
# This file is a sample configuration for Nginx.
# put this file in /etc/nginx/sites-enabled/
server {
listen 80;
server_name www.example.com;
location / {
root /var/www/example.com;
index index.html index.htm;
}
@chiehwen
chiehwen / nginx.conf
Created April 18, 2014 12:32
The central configuration file for Nginx
user www-data;
@chiehwen
chiehwen / foodsafety.tw
Created April 18, 2014 12:35
Site configuration of FoodSafety.tw for Nginx
# put this file in /etc/nginx/sites-enabled/
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@chiehwen
chiehwen / metadata.json
Created June 18, 2014 04:20
This is a JSON file that is contain provider key with the provider the box is for. Vagrant uses this to verify the provider of the box.
{
"provider": "vmware_fusion" // or other alternative providers
}
@chiehwen
chiehwen / Scan Website Directory Structure
Created July 1, 2014 05:58
Scan Website Directories
$ sudo websploit
wsf > show modules
wsf > use web/dir_scanner
wsf:Dir_Scanner > show option
wsf:Dir_Scanner > set TARGET hackers.tw
wsf:Dir_Scanner > run
@chiehwen
chiehwen / Gruntfile.coffee
Last active August 29, 2015 14:03
used to configure or define tasks and load Grunt plugins.
"use strict"
module.exports = (grunt) ->
grunt.initConfig
yeoman:
watch:
@chiehwen
chiehwen / Gruntfile.js
Created July 2, 2014 13:23
used to configure or define tasks and load Grunt plugins.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
@chiehwen
chiehwen / bower.json
Created July 2, 2014 13:33
a manifest file that provide some useful info to Bower, like dependencies, ignored files, version and etc. This is similar to Node’s package.json or Ruby’s Gemfile.
{
"name": "ProjectName",
"version": "0.0.1",
"authors": [
"Chieh-Wen Yang <dragon.d.firedrake@gmail.com>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
@chiehwen
chiehwen / server.js
Last active August 29, 2015 14:03
An example of a web server written with Node which responds with "Welcome to Node.js World."
// server.js
// Typing node server.js to turn on your Node server.
// include the http module you need
var http = require("http");
// access the createServer method in the http object
http.createServer(function(request, response) {