Skip to content

Instantly share code, notes, and snippets.

View laknath's full-sized avatar

Buddhika Laknath laknath

View GitHub Profile
@laknath
laknath / pprint_color.py
Created June 14, 2020 18:00 — forked from EdwardBetts/pprint_color.py
Python pprint with color syntax highlighting for the console
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import Terminal256Formatter
from pprint import pformat
def pprint_color(obj):
print highlight(pformat(obj), PythonLexer(), Terminal256Formatter())
@laknath
laknath / ipset_generate.sh
Created May 15, 2019 10:41 — forked from csrutil/ipset_generate.sh
IPSET - fetch certain countries ip blocks for iptables DROP
#!/bin/bash
country_block=(china bangladesh cambodia hongkong india iran iraq jordan korea kuwait malysia morocco oman pakistan qatar saudi singapore sudan thailand taiwan emirates vietnam turkey)
Hi Everyone,
I wrote this letter to my past self as a reflection exercise and have been advised to share more broadly. As a part of the Khan Academy community, you’ve been on this adventure with me so I thought you would enjoy. I’d love to know what you think (seriously, I try to read as many emails I get as possible; though I can’t respond to them all).
-Sal
Dear 2009 Sal,
I am writing to you from the future because I know you are at an interesting crossroads. You’re pretty stressed and excited that our wife is due with our first child in about a month. This has made you think about strange things, like life insurance. Don’t worry, the insurance company makes good money off the first 10 years of your policy. My only advice is to buy twice as many bottles, onesies, and burp cloths as you think you need. Also, have confidence in your paternal instincts even though you feel pretty clueless right now—mainly because you are pretty clueless right now. This is going to be the beginning of a rollercoaster, but a re
@laknath
laknath / pci_dss.md
Created May 9, 2016 01:18 — forked from diyan/pci_dss.md
PCI DSS. Useful resources