Skip to content

Instantly share code, notes, and snippets.

@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"/>
@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 / 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"
}
}
]
@miebach
miebach / gist:5525117
Last active July 5, 2023 06:00
God Mode for NT
Create a Desktop folder and name it:
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
A list of other commands that also create special folders:
{00C6D95F-329C-409a-81D7-C46C66EA7F33}
{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
@miebach
miebach / logging_demo.py
Last active December 16, 2015 00:48
Python logging example
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python logging demo from https://gist.github.com/miebach/5349852
import logging
# see http://www.shutupandship.com/2012/02/how-python-logging-module-works.html
def init_file_logger(fname="log.txt",threshhold_level="info",logger_instance=""):
@miebach
miebach / module.py
Created April 3, 2013 08:46
python 2.x doctest file pattern
#!/usr/bin/python
# -*- coding: utf-8 -*-
def f(x):
"""
returns x * x
>>> f(5)
25
>>> f(-3)
9
@miebach
miebach / rotate-a-wb-page-javascript.rst
Last active November 14, 2023 18:28
Rotate a web page 90 degree counter clockwise:

Rotate a web page 90 degree counter clockwise

Chrome

javascript: document.body.setAttribute( "style", "-webkit-transform: rotate(-90deg);");

paste into JS console: Ctrl-Shift-C -> "Console" from top menu

@miebach
miebach / README.txt
Last active October 12, 2015 17:37
Cygwin
Download http://cygwin.org/setup.exe
Save as c:\opt\cygwin\setup.exe
Store packages at c:\opt\cygwin\package
----
See also https://gist.github.com/1059810 for a "cygwin-here" registry modificatioon.
----
@miebach
miebach / git-vlog
Created July 29, 2012 08:48 — forked from asabaylus/git-vlog
Git visual log for the console
http://www.baylus.com/a-nice-visual-log-for-git-command-line/
A nice visual log for Git command line
I like having a quick visual log for Gits command line. Here’s a little git alias which’ll display a brief and colorful summary for your projects.
Enter the following code in terminal or git bash.
You can now generate a visual tree style log, open your shell