Skip to content

Instantly share code, notes, and snippets.

@miebach
miebach / Default.sublime-keymap
Last active December 19, 2015 03:39
Sublime 2 Settings - Menu "Preferences" -> "Settings - User"
[
{
"keys": ["alt+w"],
"command": "toggle_setting",
"args":
{
"setting": "word_wrap"
}
}
]
#!/usr/bin/perl
use strict;
use warnings;
use VMware::VIRuntime;
# Default Variablen
my $exit_code = 0;
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hello</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
Hello World
</body>
@miebach
miebach / CherryPy as a windows service
Last active December 23, 2015 08:29
Cherrypy server logging and running as a service on windows
This will result in 3 log files: the access log, the error log
and another one for the remaining console_output. Even
after configuring the access and the error log still
a lot of output only gos to the console, so it is necessary
to catch it. On windows it could be done like this:
serve.cmd:
---------
cd %~dp0
@miebach
miebach / .geo
Last active December 23, 2015 10:29
Set screen geometry for different screens and resolutions
#!/bin/sh
export GEO=1024x570
#export GEO=1024x1000
#export GEO=1024x600
#export GEO=1024x740
#export GEO=1152x844
#export GEO=1280x740
#export GEO=1280x1000
#export GEO=1440x840
@miebach
miebach / gist:6643201
Last active December 23, 2015 13:39
windows command shortcuts
http://support.microsoft.com/kb/192806
english:
Accessibility Options | access.cpl
Add/Remove Programs | appwiz.cpl
Add Hardware Wizard | hdwwiz.cpl
Automatic Updates | wuaucpl.cpl
Bluetooth Properties | bthprops.cpl
Display Properties | desk.cpl
@miebach
miebach / script-declutter
Created October 11, 2013 18:05
Removes control characters from a typescript created with the linux "script" command.
#!/usr/bin/perl -wp
# clean up control characters and other non-text detritus that shows up
# when you run the "script" command.
# From http://impson.tzo.com/~jdimpson/bin/script-declutter
# Copyright Jeremy Impson - http://impson.tzo.com/~jdimpson/
# Also see http://jdimpson.livejournal.com/7040.html
BEGIN {
@miebach
miebach / gist:6942965
Last active December 25, 2015 07:59
sublime text 3 unoficial ppa
From: http://www.webupd8.org/2013/07/sublime-text-3-ubuntu-ppa-now-available.html (with modifications)
Before proceeding, if you've already installed Sublime Text, make sure the application is not running or else there might be some visual glitches (that's because the package in our PPA will replace any already existing Sublime Text deb packages). This only occurs when switching from the Sublime Text 3 debs downloaded from its website to the packages in our PPA.
Also, using the instructions below, the old Sublime Text 2 package (if you've used our Sublime Text 2 PPA) will be replaced with the new Sublime Text 3.
To add the WebUpd8 Sublime Text 3 (beta) PPA and install the application in Ubuntu 13.10, 13.04, 12.10 or 12.04 (and derivatives), use the following commands:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
@miebach
miebach / console.xml
Last active December 27, 2015 19:39
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="20" columns="98" buffer_rows="500" buffer_columns="0" init_dir="c:\" start_hidden="0" save_size="1" shell="c:\bip\git\bin\sh.exe --login -i">
<colors>
<color id="0" r="0" g="43" b="54"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>
<color id="5" r="211" g="54" b="130"/>
#!/usr/bin/env bash
# gist at https://gist.github.com/miebach/7391024
# save this file to .git/hooks/post-checkout
# and also to .git/hooks/post-merge
# and make it executable
# Delete .pyc files and empty directories from root of project
cd ./$(git rev-parse --show-cdup)