Skip to content

Instantly share code, notes, and snippets.

View gordio's full-sized avatar

Oleh Hordiienko gordio

View GitHub Profile
@gordio
gordio / example.py
Last active February 16, 2018 12:33 — forked from diosmosis/example.py
Python decorator that catches exceptions and logs a traceback that includes every local variable of each frame.
import os
from log_exceptions import log_exceptions
def throw_something(a1, a2):
raise Exception('Whoops!')
@log_exceptions(log_if = os.getenv('MYAPP_DEBUG') is not None)
def my_function(arg1, arg2):
throw_something(arg1 + 24, arg2 - 24)
@gordio
gordio / mutt-gmail-yandex.md
Created April 21, 2017 00:14 — forked from lazyfrost/mutt-gmail-yandex.md
Configuring mutt to work with gmail and yandex
@gordio
gordio / Resources.md
Last active May 29, 2016 18:55 — forked from audibleblink/Resources.md
Resources for Learning iOS
[1]: https://www.udemy.com/swift-learn-apples-new-programming-language-by-examples/
[2]: https://www.udacity.com/course/ud585
[3]: http://www.lynda.com/Swift-tutorials/Swift-Programming-Language-First-Look/182175-2.html
[4]: https://www.bloc.io/swiftris-build-your-first-ios-game-with-swift
[5]: http://www.bignerdranch.com/we-teach/how-to-prepare/ios-device-provisioning.html
[6]: https://parse.com
[7]: http://www.weheartswift.com/swift-programming-scratch-100-exercises/
[8]: https://www.weheartswift.com/object-oriented-programming-swift/
[9]: http://www.learnswift.io/blog/2014/6/12/size-classes-with-xcode-6-and-swift
[10]: http://www.raywenderlich.com/83129/beginning-auto-layout-tutorial-swift-part-1
*filter
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
@gordio
gordio / LICENSE.txt
Created December 10, 2012 22:37 — forked from 140bytes/LICENSE.txt
Bytes Size to Human String
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@gordio
gordio / gist:1725186
Created February 2, 2012 19:13 — forked from lentil/gist:810399
PEP8 pre-commit hook in Python
#!/usr/bin/env python
from __future__ import with_statement
import os
import re
import shutil
import subprocess
import sys
import tempfile