Skip to content

Instantly share code, notes, and snippets.

View dustractor's full-sized avatar

Shams Kitz dustractor

View GitHub Profile
@dustractor
dustractor / this.ahk
Created November 15, 2020 07:50
"blah.exe"&"this.ahk" -- Hide the $#!% window that opens up when you run !shell commands or call system() from a vim terminal
DetectHiddenWindows, On
WinWait, ahk_exe winpty-agent.exe
WinHide, ahk_exe winpty-agent.exe
function! NamelessWipeout()
for i in range(bufnr('$'),1,-1)
if bufname(i) == ""
exe "bw ".i
endif
endfor
endfunction
com! WipeoutNameless call NamelessWipeout()
#!/bin/bash
# usage:
# give it a number between 0 and 1023
# to turn up and down the backlight and
# uncomment line 17 to also reset
# the pixel-brightness and gamma settings
# Clearly the Mini-DisplayPort is plugged in but
# CHECK THAT THE USB IS PLUGGED IN!!!
# (On my machine it matters which port, also.)
# Sometimes the device does not exist.
@dustractor
dustractor / tkcommandbuttons.py
Last active November 16, 2023 03:24
it makes buttons from strings given on the command line and the strings are commands for the buttons to do
#!/usr/bin/env python3
# vim: ft=python
'''
it makes buttons from strings given on the command line
and the strings are commands for the buttons to do
escaping is hard
'''
@dustractor
dustractor / elysiun-blue.xml
Created May 6, 2016 18:05
[Blender Theme] -- Elysiun (blue) -- elysiun-blue is a modification of the standard elsyiun [sic] theme with the orange parts made blue.
<bpy>
<Theme>
<user_interface>
<ThemeUserInterface menu_shadow_fac="0.5"
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
widget_emboss="#ffffff05"
axis_x="#dc0000"
axis_y="#00dc00"
@dustractor
dustractor / setTitleToVersionName.applescript
Created March 1, 2016 00:56 — forked from hishma/setTitleToVersionName.applescript
Copy the Aperture Version Name to the IPTC ObjectName (Title field in Aperture)
-- Copy the Aperture Version Name to the IPTC ObjectName (Title field in Aperture)
tell application "Aperture"
set selectedImages to (get selection)
if selectedImages is {} then
error "Please select an image."
else
repeat with i from 1 to count of selectedImages
tell library 1
tell item i of selectedImages
@dustractor
dustractor / dustractor-sol-mctheme.ini
Last active January 20, 2016 02:15 — forked from Ajnasz/ajnasz-blue.ini
Light colorscheme for Midnight Commander. Loosely based on Solarized Palette. Uses xterm-256-color names to specify color. Works for me in iTerm.
[skin]
description=Dustractor-Sol-McTheme [forked from Ajnasz Blue Theme]
[Lines]
horiz=─
vert=│
lefttop=╭
righttop=╮
leftbottom=╰
rightbottom=╯
@dustractor
dustractor / tabcolor.py
Created November 29, 2015 00:59
Python script to change iTerm2 titlebar color. Supply three or six digit hex color string on the command line and it will convert to iTerm2 escape codes.
#! /usr/bin/env python3
# usage: tabcolor '#FF00FF'
import sys
if len(sys.argv) > 1:
color = sys.argv[-1]
if color[0] == "#" and len(color) in {7,4}: