Skip to content

Instantly share code, notes, and snippets.

View chiehwen's full-sized avatar

Chuck Yang chiehwen

View GitHub Profile
@chiehwen
chiehwen / robot.js
Created December 11, 2012 01:37
USA
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(560);
input {
file {
type => nginx_web
path => ["/var/log/nginx/*"]
exclude => ["*.gz"]
}
}
filter {
grok {
@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: {