Skip to content

Instantly share code, notes, and snippets.

0 ;;; Fast Acks
chain=postrouting action=mark-packet new-packet-mark=fast-ack passthrough=no tcp-flags=ack protocol=tcp out-interface=pppoe-out1 packet-size=0-40 log=no log-prefix=""
1 ;;; Guest Network Mark
chain=postrouting action=mark-packet new-packet-mark=guest-network passthrough=no src-address=10.64.180.100-10.64.180.150 out-interface=pppoe-out1 log=no log-prefix=""
2 ;;; Mark mosh
chain=postrouting action=mark-packet new-packet-mark=mosh passthrough=no protocol=udp out-interface=pppoe-out1 dst-port=60000-61000 log=no log-prefix=""
3 ;;; Mark ssh
[root@nathan-test-1 /var/cores]# pstack core.webkit_server.5667
core 'core.webkit_server.5667' of 5667: /opt/rubies/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/extensions/x86_64-s
----------------- lwp# 1 / thread# 1 --------------------
fffffd7fe00ee7dd _ZN3WTF17TCMalloc_PageHeap8GrowHeapEm () + cd
fffffd7fe00efccc _ZN3WTF25TCMalloc_Central_FreeList18FetchFromSpansSafeEv () + 3fc
fffffd7fe00efd5b _ZN3WTF25TCMalloc_Central_FreeList11RemoveRangeEPPvS2_Pi () + 4b
fffffd7fe00f0da8 _ZN3WTF10fastMallocEm () + 258
fffffd7fe01008ea _ZN3WTF10StringImpl5emptyEv () + 4a
fffffd7fe021b872 _ZN3JSC19initializeThreadingEv () + 22
fffffd7fe0f6b1d9 _ZN7WebCore16ScriptController19initializeThreadingEv () + 9
[root@localhost nginx]# ls -la
total 24
drwxrwxr-x 2 nginx nginx 4096 Nov 18 10:11 .
drwxr-xr-x 5 root root 4096 Nov 18 09:48 ..
-rw-r--r-- 1 nginx nginx 0 Nov 18 10:06 access.log
-rw-r--r-- 1 nginx nginx 0 Nov 18 10:11 error.log
[root@localhost nginx]# ls -l /etc/ld.so.preload
ls: /etc/ld.so.preload: No such file or directory
@cornet
cornet / init.lua
Last active February 5, 2016 13:17
Hammerspoon config
-- Launch new iTerm window on current desktop
hs.hotkey.bind({"alt", "shift"}, "return", function()
if hs.application.find("iTerm") then
hs.applescript.applescript([[
tell application "iTerm"
create window with default profile
end tell
]])
else
hs.application.open("iTerm")
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=accounts.google.com
i:/C=US/O=Google Inc/CN=Google Internet Authority G2
1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
@cornet
cornet / webserver.md
Last active January 21, 2016 22:32
Various ways of creating a static web server for testing on port 8080

Ruby

ruby -run -e httpd . -p 8080

PHP

php -S localhost:8080

Python 2.7

python -m SimpleHTTPServer 8080

Python 3

@cornet
cornet / terraform.tf
Last active July 1, 2016 08:10
So what happens if you nuke your terraform state or have buckets that you want to manage using terraform ?
#
# Bucket doesn't exist yet, run terraform plan
#
$ terraform plan
Refreshing Terraform state prior to plan...
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import javax.net.ssl.SSLServerSocketFactory;
/*
* * Source from Christopher Schultz
* * @see http://markmail.org/message/zn4namfhypyxum23
* */
public class SSLInfo
====================================================================
RPKI Validation Failed (Code: 9)
====================================================================
Your prefix: 62.210.0.0/16:
Prefix Description: Online.net
Update time: 2015-09-24 15:06 (UTC)
Detected by #peers: 16
Detected prefix: 62.210.94.220/32
Announced by: AS34569 (Networx-Bulgaria Ltd.)
Upstream AS: AS20080 (Florida International University)
#!/usr/bin/env ruby
# Netstat module taken from https://github.com/davidw/ruby-netstat/blob/master/lib/netstat.rb
module Netstat
PROC_NET_TCP = "/proc/net/tcp"
# States from http://snippets.dzone.com/posts/show/12653
TCP_STATES = {
'00' => 'UNKNOWN', # Bad state ... Impossible to achieve ...
'FF' => 'UNKNOWN', # Bad state ... Impossible to achieve ...