Skip to content

Instantly share code, notes, and snippets.

@qwerty12
qwerty12 / toychest.diff
Created July 15, 2013 02:21
Modifications to Jackson Gariety's Toy Chest theme (thank you ;))
# Get the theme from here: http://toychesttheme.com/
--- toychest.terminal 2013-05-18 05:42:44.000000000 +0100
+++ toychest.terminal 2013-05-18 05:42:25.000000000 +0100
@@ -169,18 +169,18 @@
AD0AQwBMAFIAXwB0AHsApQCnAKkAqwCwALUAtwC5AL4AyQDSAN8A4gDvAPgA/QEFAQgB
GgEdASIAAAAAAAACAQAAAAAAAAAjAAAAAAAAAAAAAAAAAAABJA==
</data>
+ <key>BlinkText</key>
+ <false/>
<key>CursorBlink</key>
@qwerty12
qwerty12 / visor.diff
Created July 15, 2013 02:22
Some tweaks to Toy Chest for binaryage's TotalTerminal
--- toychest.terminal 2013-05-18 05:42:25.000000000 +0100
+++ Visor.terminal 2013-05-18 05:45:07.000000000 +0100
@@ -162,12 +162,12 @@
<data>
YnBsaXN0MDDUAQIDBAUGHyBYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKUHCBEVHFUkbnVsbNQJCgsMDQ4PEFVOU1JHQlxOU0NvbG9yU3BhY2VfEBJOU0N1
- c3RvbUNvbG9yU3BhY2VWJGNsYXNzTxAnMC4xNTY4NjI3NDUxIDAuMjM1Mjk0MTE3NiAw
- LjMwMTk2MDc4NDMAEAGAAoAE0hIMExRUTlNJRBABgAPSFhcYGVokY2xhc3NuYW1lWCRj
- bGFzc2VzXE5TQ29sb3JTcGFjZaIaG1xOU0NvbG9yU3BhY2VYTlNPYmplY3TSFhcdHldO
- U0NvbG9yoh0bXxAPTlNLZXllZEFyY2hpdmVy0SEiVHJvb3SAAQAIABEAGgAjAC0AMgA3
@qwerty12
qwerty12 / .dircolors
Created July 15, 2013 11:40
dircolors configuration used
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
@qwerty12
qwerty12 / IntelPWMManipulation.cpp
Created August 7, 2013 21:16
Based on eDio and medvegiypreved's work here: https://wiki.archlinux.org/index.php/Backlight#Backlight_PWM_modulation_frequency_.28Intel_i915_only.29 and EmlyDinesh's code to write to the memory address DON'T USE THIS AS-IS!
#include <IOKit/IOService.h>
class IntelPWMManipulation : public IOService
{
OSDeclareDefaultStructors(IntelPWMManipulation);
public:
bool start(IOService *provider);
};
@qwerty12
qwerty12 / install_zsh.sh
Last active December 21, 2015 11:49
Set up zsh on OS X with my preferred configuration (this will remove any pre-existing .zshrc!)
#!/bin/sh
# Install my favourite coreutils: GNU's. Sorry, BSD...
brew rm coreutils >/dev/null 2>&1
brew update
# Add progress bar patch
patch -p0 << "EOF"
--- /usr/local/Library/Formula/coreutils.rb.orig 2013-09-06 15:23:52.000000000 +0100
+++ /usr/local/Library/Formula/coreutils.rb 2013-09-06 15:33:35.000000000 +0100
@qwerty12
qwerty12 / atheros-fw.py
Created September 1, 2013 00:41
Script to create a C header with the contents of the AR3011 firmware for ioath3kfirmware
#!/usr/bin/env python
#atheros-fw.py > OS-X-Atheros-3k-Firmware/IOath3kfrmwr/ath3k-1fw.h
import sys
import binascii
with open("AtherosBT.bin", "rb") as f:
bytes = f.read()
size = len(bytes)
sys.stdout.write("\n/* ath3k-1-linux-git.h begin binary data: */\n")
##!/bin/sh
# Use Ubuntu because they have their heads screwed on straight and patch GRUB to STFU when starting
mkdir /mnt/win
mount -t ntfs-3g -o windows_filenames /dev/sda1 /mnt/win
grub-install --no-floppy --modules=ntfs --root-directory=/mnt/win --boot-directory=/mnt/win/Boot /dev/sda
@qwerty12
qwerty12 / VistaSwitcherFixer.c
Created November 7, 2016 06:16
Stop VS from keeping the US layout loaded and only intercept Alt+`
#include "avrf.h"
typedef HKL(WINAPI *P_LOADKEYBOARDLAYOUTW)(LPCWSTR, UINT);
HKL WINAPI LoadKeyboardLayoutWHook(LPCWSTR, UINT);
//typedef BOOL(WINAPI *P_REGISTERHOTKEY)(HWND, INT, UINT, UINT);
BOOL WINAPI RegisterHotKeyHook(HWND, INT, UINT, UINT);
typedef UINT(WINAPI *P_MAPVIRTUALKEYEXW)(UINT, UINT, HKL);
UINT WINAPI MapVirtualKeyExWHook(UINT, UINT, HKL);
#include <sdkddkver.h>
#include <windows.h>
#include <Shellapi.h>
#include <Shlobj.h>
#include <strsafe.h>
#include "extlib\MinHook.h"
#define WM_SHELLNOTIFY WM_USER+5
#define WM_TRAYCMD 0x800A
@qwerty12
qwerty12 / BrightnessSetter.ahk
Last active July 25, 2023 13:06
BrightnessSetter: set laptop brightness and show Windows 10's native brightness OSD (https://github.com/qwerty12/AutoHotkeyScripts/tree/master/LaptopBrightnessSetter)
class BrightnessSetter {
; qwerty12 - 27/05/17
; https://github.com/qwerty12/AutoHotkeyScripts/tree/master/LaptopBrightnessSetter
static _WM_POWERBROADCAST := 0x218, _osdHwnd := 0, hPowrprofMod := DllCall("LoadLibrary", "Str", "powrprof.dll", "Ptr")
__New() {
if (BrightnessSetter.IsOnAc(AC))
this._AC := AC
if ((this.pwrAcNotifyHandle := DllCall("RegisterPowerSettingNotification", "Ptr", A_ScriptHwnd, "Ptr", BrightnessSetter._GUID_ACDC_POWER_SOURCE(), "UInt", DEVICE_NOTIFY_WINDOW_HANDLE := 0x00000000, "Ptr"))) ; Sadly the callback passed to *PowerSettingRegister*Notification runs on a new threadl
OnMessage(this._WM_POWERBROADCAST, ((this.pwrBroadcastFunc := ObjBindMethod(this, "_On_WM_POWERBROADCAST"))))