Skip to content

Instantly share code, notes, and snippets.

View tfeldmann's full-sized avatar
🐧
computer says no

Thomas Feldmann tfeldmann

🐧
computer says no
View GitHub Profile
@tfeldmann
tfeldmann / rot18.c
Last active July 9, 2020 09:22
ROT18 implementation in python and c
void rot18(char *c)
{
while (*c)
{
if (*c >= 'A' && *c <= 'Z')
*c = ('A' + (*c - 'A' + 13) % 26);
else if (*c >= 'a' && *c <= 'z')
*c = ('a' + (*c - 'a' + 13) % 26);
else if (*c >= '0' && *c <= '9')
*c = ('0' + (*c - '0' + 5) % 10);
@mnot
mnot / snowden-ietf93.md
Last active September 12, 2023 13:40
Transcript of Edward Snowden's comments at IETF93.
@angstwad
angstwad / dict_merge.py
Last active March 1, 2024 23:53
Recursive dictionary merge in Python
# Copyright 2016-2022 Paul Durivage
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@jfburkhart
jfburkhart / qt_mpl_pyside_datasource.py
Created April 19, 2012 19:06
A modification of Eli Bendersky's nice example of PyQt and matplotlib to work with PySide
"""
Series of data are loaded from a .csv file, and their names are
displayed in a checkable list view. The user can select the series
it wants from the list and plot them on a matplotlib canvas.
Use the sample .csv file that comes with the script for an example
of data series.
Eli Bendersky (eliben@gmail.com)
License: this code is in the public domain
@axelav
axelav / gist:1839777
Created February 15, 2012 22:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@saghul
saghul / pyqt_opencv.py
Created June 29, 2011 22:22
Render OpenCV video on a PyQt widget
# coding=utf8
# Copyright (C) 2011 Saúl Ibarra Corretgé <saghul@gmail.com>
#
# Some inspiration taken from: http://www.morethantechnical.com/2009/03/05/qt-opencv-combined-for-face-detecting-qwidgets/
import cv
import sys
@lantiga
lantiga / gist:288267
Created January 27, 2010 23:20
Python NSNotificationCenter implementation
# Copyright (c) 2010, Luca Antiga, Orobix Srl.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#