Skip to content

Instantly share code, notes, and snippets.

Avatar

Karol Kuczmarski Xion

View GitHub Profile
@poxip
poxip / loading.py
Last active Aug 29, 2015
Loading a global module in Python3
View loading.py
import sys
from os import getcwd
from importlib import import_module
def import_global_module(name):
old_path = sys.path
try:
sys.path.remove(getcwd())
sys.path.remove('')
except ValueError:
@canni
canni / enum.py
Last active Nov 5, 2015
SQLAlchemy Enum column type using python's enum34
View enum.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from enum import Enum
from sqlalchemy.types import SchemaType, TypeDecorator
from sqlalchemy.types import Enum as SAEnum
class EnumType(SchemaType, TypeDecorator):
def __init__(self, enum, name):
@tornewuff
tornewuff / subl
Created Jan 16, 2013
Script to wrap Sublime Text 2 on Linux, handling proper background invocation and using rmate to edit remotely when not in an X session (the guess being that if there's no DISPLAY we are connected via ssh).
View subl
#!/bin/bash
if [ -z "$DISPLAY" ]; then
exec rmate "$@"
fi
for arg do
case $arg in
"-w" | "--wait") NEED_FOREGROUND=1;;
"-h" | "--help") NEED_FOREGROUND=1;;
@mojombo
mojombo / vwilight.vim
Created Jan 26, 2011
vwilight.vim: A TRUE Twilight color theme for Vim
View vwilight.vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@alirobe
alirobe / reclaimWindows10.ps1
Last active Aug 11, 2020
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
You can’t perform that action at this time.