Skip to content

Instantly share code, notes, and snippets.

View John-Lin's full-sized avatar
👋
hi

Che-Wei Lin John-Lin

👋
hi
View GitHub Profile
@fntsrlike
fntsrlike / NCHU SSL-VPN for OS X.md
Last active August 26, 2016 16:12
NCHU SSL-VPN for OS X
@ozooxo
ozooxo / gist:10600945
Last active November 7, 2016 21:06
Set up honeyd (ubuntu 12.04)
# installation
sudo apt-get install honeyd
sudo apt-get install nmap #(supported software for port scanning)
# check my eth0 address
ifconfig
### eth0 Link encap:Ethernet HWaddr 00:26:2d:f9:db:be <-----------------use this one
### inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
### inet6 addr: fe80::226:2dff:fef9:dbbe/64 Scope:Link
@iwillwen
iwillwen / co.js
Last active November 24, 2016 10:15
A simple version of co
/**
* A simple co
* @param {Function} fn Generator Function
* @return {Function} callback
*/
function co(fn) {
return function(done) {
done = done || function() {};
var gen = fn();
@phalt
phalt / main.go
Created December 3, 2014 14:51
Simple HTTP API in Go
package main
import (
"github.com/gin-gonic/gin"
"database/sql"
"github.com/coopernurse/gorp"
_ "github.com/mattn/go-sqlite3"
"log"
"time"
"strconv"
@widged
widged / d3lib.md
Created October 4, 2013 03:29
d3 libraries

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,

xAxis:{type:'Category',field: "Month",orderRule:'Date'},

@StevenACoffman
StevenACoffman / Comparison of multi-host Docker networking.md
Last active June 27, 2022 09:14
Comparison of multi-host Docker networking
@vishalwy
vishalwy / compare.py
Last active September 5, 2022 09:57
Compares /proc/stat vs top
#!/usr/bin/env python
import re
import os
import sys
import threading
import subprocess
import getopt
import time
@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@dannvix
dannvix / intercept-https-with-python-mitmproxy.md
Last active February 16, 2023 02:43
Intercept and manipulate HTTPs traffic with Python and mitmproxy

Intercepts HTTPs Traffic with Python & mitmproxy

Warning

This Gist is created in 2014, and it's highliy outdated now, according to one of mitmproxy's manjor contributor (check his comment below). Thanks for letting us know, @mhils!

Introduction

Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.

@zed
zed / run-script-on-alert-pipe.py
Last active March 30, 2023 18:28
React to snort alert
#!/usr/bin/env python
"""Run `snort -A console` command using a pipe.
Warning! Alerts are delayed until snort's stdout buffer is flushed.
"""
from __future__ import print_function
from subprocess import Popen, PIPE, STDOUT
snort_process = Popen(['snort', '-A', 'console', '-c', 'snort.conf'],
stdout=PIPE, stderr=STDOUT, bufsize=1,