Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am tiborsimon on github.
  • I am tiborsimon ( on keybase.
  • I have a public key ASBVdY9ZTpKqz5l3nKXehbQ9e9KKHGRp3ySKcf9iYH0LUQo

To claim this, I am signing this object:

import win32clipboard
from subprocess import call
# get clipboard data
url = win32clipboard.GetClipboardData()
call(['youtube-dl', '--extract-audio', '--audio-format', 'mp3', '--prefer-ffmpeg', url])
View index.html
<div class="wrapper">
<h1>Lillus <span class="beating">&hearts;</span> Tibcsi</h1>
<hr />
<div class="item" id="from"><b>2013. 12. 12. 21:45</b><br>ota vagyunk <b>Egyutt</b>, ami</div>
<div class="item" id="since"></div>
<div class="item" id="stats"></div>
tiborsimon / touchpad.conf
Last active Nov 11, 2016
X240 touchpad config
View touchpad.conf
# from
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# Additional options may be added in the form of
# Option "OptionName" "value"
Section "InputClass"
Identifier "touchpad catchall"
tiborsimon /
Last active May 12, 2017
Let's git a bit init file. Use it by executing it from the raw Gist: bash <(curl -fsSL
#!/usr/bin/env bash
header () {
local YELLOW=$(tput setaf 3)
local BOLD=$(tput bold)
local RESET=$(tput sgr0)
printf "\n${YELLOW}${BOLD}== $1 ==${RESET}\n"
log () {
tiborsimon /
Created Apr 9, 2016
Brute force zip opener
import zipfile
import itertools
import sys
import os
from timeit import default_timer as timer
def get_next_key_for(charset, from_index=0):
index = 0
for i in range(len(charset)):
tiborsimon / gh-ssh-uploader
Created Mar 19, 2016
Upload your ssh key to GitHub via the GitHub API
View gh-ssh-uploader
# This script will upload your pre-generated ssh key to your GitHub account using the GitHub API.
# Make sure you set up the GITHUB_USERNAME and SSH_KEY variables before you run the script.
# Corresponding article:
# Created by Tibor Simon 2016
tiborsimon / .emacs
Last active Mar 11, 2016
Temporary emacs config
View .emacs
;; Adding package manager with a few default packages
(require 'package)
;; packages
(setq package-archives '(("gnu" . "")
("org" . "")
("marmalade" . "")
("melpa-stable" . "")))
tiborsimon / all.m
Last active Nov 12, 2015
Equation engine
View all.m
%% Signal synthesizer functions
function s = construct_with_n_N()
n = get_n();
N = get_N();
phi = data.phi;
k = 0:n-1;
k = k/n;
phi = phi*pi/180;
s = trigfun(2*pi*N*k + phi);
tiborsimon /
Created Oct 29, 2015
Regular expression generator for mandatory characters in arbitrary order.
from itertools import permutations
import re
def generate_mandatory_arbitrary(content):
pattern_string = '('
for p in permutations(content):
pattern_string += '(.*'
for i in p:
pattern_string += '{}.*'.format(i)
pattern_string += ')|'