Skip to content

Instantly share code, notes, and snippets.

View c9n's full-sized avatar
🎯
Focusing

Lynn c9n

🎯
Focusing
View GitHub Profile
@c9n
c9n / gist:af566ca36659da4002bc159ce0978753
Created August 14, 2017 08:50 — forked from rebx/gist:1250106
tshark'ing mysql
live:
tshark -i eth0 -aduration:60 -d tcp.port==3306,mysql -T fields -e mysql.query 'port 3306'
capture:
tcpdump -i eth0 port 3306 -s 1500 -w tcpdump.out
tshark -r tcpdump.out -d tcp.port==3306,mysql -T fields -e mysql.query > query_log.out
@c9n
c9n / Makefile
Last active March 28, 2016 06:45 — forked from jl2/Makefile
A simple trie data structure in C++.
trie: main.cpp Makefile
clang++ -O3 -std=c++11 -stdlib=libc++ -Wall -o trie main.cpp -lboost_system
@c9n
c9n / rpm-from-source.sh
Last active December 14, 2015 09:20 — forked from fernandoaleman/rpm-from-source.sh
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
* Updated for Laravel 4.2.1 (2014-06-01)
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
namespace {