Skip to content

Instantly share code, notes, and snippets.

--- Valid strings are any single-character string, or any of the following strings:
---
--- f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15,
--- f16, f17, f18, f19, f20, pad., pad*, pad+, pad/, pad-, pad=,
--- pad0, pad1, pad2, pad3, pad4, pad5, pad6, pad7, pad8, pad9,
--- padclear, padenter, return, tab, space, delete, escape, help,
--- home, pageup, forwarddelete, end, pagedown, left, right, down, up,
--- shift, rightshift, cmd, rightcmd, alt, rightalt, ctrl, rightctrl,
--- capslock, fn
"==============================================================================
" GENERAL SETTINGS
"==============================================================================
""" Map leader to space =======================================================
let mapleader=" "
""" General settings ==========================================================
set scrolloff=5
set visualbell
@tiborsimon
tiborsimon / keybase.md
Last active January 10, 2019 13:18
keybase.md

Keybase proof

I hereby claim:

  • I am tiborsimon on github.
  • I am tiborsimon (https://keybase.io/tiborsimon) on keybase.
  • I have a public key ASBVdY9ZTpKqz5l3nKXehbQ9e9KKHGRp3ySKcf9iYH0LUQo

To claim this, I am signing this object:

@tiborsimon
tiborsimon / type_command.m
Last active September 24, 2018 05:59
Matlab string to keypresses function
% Based on the thread: http://stackoverflow.com/questions/32710709/prepare-command-in-matlab/32721523?noredirect=1#comment53292353_32721523
function type_command(command)
commandwindow; %// make Matlab command window have focus
robot = java.awt.Robot; %/ Java Robot class
for k=1:length(command)
switch command(k)
case 'a'
robot.keyPress (java.awt.event.KeyEvent.VK_A);
robot.keyRelease (java.awt.event.KeyEvent.VK_A);
case 'b'
@tiborsimon
tiborsimon / solarized_gist_light.css
Last active August 5, 2017 20:16
Solarized Gist theme using basic CSS.
.gist .gist-file {
background-color: transparent !important;
border: none !important;
background-color: #fdf6e3;
::-webkit-scrollbar {
width: .5em;
height: .5em;
}
import win32clipboard
from subprocess import call
# get clipboard data
win32clipboard.OpenClipboard()
url = win32clipboard.GetClipboardData()
win32clipboard.CloseClipboard()
call(['youtube-dl', '--extract-audio', '--audio-format', 'mp3', '--prefer-ffmpeg', url])
<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>
</div>
@tiborsimon
tiborsimon / init.sh
Last active May 12, 2017 07:25
Let's git a bit init file. Use it by executing it from the raw Gist: bash <(curl -fsSL https://gist.githubusercontent.com/tiborsimon/f02970b14d497029126381f630870889/raw)
#!/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
tiborsimon / touchpad.conf
Last active November 11, 2016 15:56
X240 touchpad config
# from http://mydevelopedworld.wordpress.com/2013/11/30/how-to-configure-new-lenovo-x240-touchpad-on-ubuntu-13-10/
# 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
tiborsimon / ziphacker.py
Created April 9, 2016 22:23
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)):