Skip to content

Instantly share code, notes, and snippets.

@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 / wheezy-tasksel-laptop.sh
Created March 21, 2013 09:55
debian wheezy: conent of tasksel "laptop" - from http://wiki.debian.org/tasksel#A.22laptop.22_task
sudo apt-get install acpi-support acpi acpid anacron apmd avahi-autoipd cpufrequtils powertop pcmciautils pm-utils wpasupplicant
sudo apt-get install bluetooth wireless-tools
<!-- BiwaScheme 0.6.1 -->
<html>
<head>
<title>enchant.js sample in BiwaScheme</title>
</head>
<body>
<div id="enchant-stage" />
@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 / gist:4139268
Created November 24, 2012 11:25
reST - Restructured Text
@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.
----