Skip to content

Instantly share code, notes, and snippets.

View nickylimjj's full-sized avatar
💭
loves itacho sushi

Nicky Lim nickylimjj

💭
loves itacho sushi
View GitHub Profile
def b ():
print( myvar )
def a ():
myvar = 'a'
b()
myvar = 'outer'
a() # will print 'outer' because it looks down the scope chain, NOT execution / stack trace
@nickylimjj
nickylimjj / scapy-quickstart.py
Created December 4, 2019 14:49
[scapy] quickstart guide to parse pcaps
#!/usr/bin/env python3
from scapy.all import *
filename = "capture.pcap"
pcap = rdpcap(filename)
result = ''
for p in pcap[TCP]:
@nickylimjj
nickylimjj / Makefile
Last active December 18, 2019 00:55
Sample makefile from .s -> bin
AS := as
LD := ld
SRC := $(wildcard *.s)
OBJ := $(patsubst %.s, %.o, $(SRC))
BIN := $(patsubst %.o, %, $(OBJ))
.PHONY: all
all: $(BIN)
" .vimrc
" vim configuration file
" Created by Nicky Lim
syntax enable
filetype plugin indent on
set number
set rnu
set colorcolumn=81
highlight CursorLine ctermbg=Black
# .bash_aliases
# Useful commands for the terminal
# Created by Nicky Lim
# some references from
## https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
############################
# Useful in-built commands #
############################
@nickylimjj
nickylimjj / .tmux.conf
Last active May 15, 2020 02:31
tmux conf file
# .tmux.conf
# tmux configuration file
# Created by NICKY LIM
# prefix t puts the timer on
# prefix ? shows help
unbind %
unbind '"'