Skip to content

Instantly share code, notes, and snippets.

View rxw1's full-sized avatar
☠️

rxw1

☠️
  • Upper Silesia, Germany
View GitHub Profile
@rxw1
rxw1 / dock-properties.applescript
Created July 16, 2012 21:47
Get and set OS X Dock properties
tell application "System Events"
tell dock preferences
get properties
set properties to {minimize effect:scale, magnification size:0.5, dock size:0.2, autohide:true, animate:true, magnification:false, screen edge:bottom}
end tell
end tell
-- http://www.macosxautomation.com/applescript/features/system-prefs.html
@rxw1
rxw1 / pledit.sh
Created July 20, 2012 00:28
Edit Property Lists with plutil and Sublime (or any other $EDITOR)
pledit() {
test ! -O $1 && x=sudo
$x plutil -convert xml1 $1 && subl -wn $1
$x plutil -lint $1 && $x plutil -convert binary1 $1
}
@rxw1
rxw1 / amd-barts-gpu-debug-info
Created August 6, 2012 23:44
AMDBartsGraphicsAccelerator // GPU Debug Info
07.08.12 01:31:34,000 kernel[0]: AMDBartsGraphicsAccelerator: ** Device in slot: SLOT--1 **
07.08.12 01:31:34,000 kernel[0]: ** GPU Debug Info Start **
07.08.12 01:31:34,000 kernel[0]: 0x00006739
07.08.12 01:31:34,000 kernel[0]: 0x00000091
07.08.12 01:31:34,000 kernel[0]: 0x00000001
07.08.12 01:31:34,000 kernel[0]: 0x00000018
07.08.12 01:31:34,000 kernel[0]: 0x0000f7e2
07.08.12 01:31:34,000 kernel[0]: 0x00000001
07.08.12 01:31:34,000 kernel[0]: 0x00000001
07.08.12 01:31:34,000 kernel[0]: 0x00006739
@rxw1
rxw1 / wp.sh
Created November 23, 2012 03:22
Reminds you to do your work
#!/bin/zsh
# Fri Nov 23 03:17:47 CET 2012
# https://gist.github.com/4133872
# Copyright 2012 (C) René Wilhelm <[email protected]>
# Use at your own risk.
# A simple timer to remind you to do your work and do something else in given
# intervals. Somewhere else these kind of reminders are known as pomodoro
# anti-procrastination (whatever) timers. In addition to this you could put
@rxw1
rxw1 / duckweed.hex
Created November 23, 2012 03:37
PowerColor HD6850 SCS3 Personality (Duckweed, OS X 10.8, ATI, AMD, Radeon)
Personality: Duckweed
ConnectorInfo count in decimal: 4
Disk offset in decimal 179744
0000000: 00 02 00 00 14 02 00 00 00 01 00 00 00 00 02 05 ................
0000010: 04 00 00 00 04 02 00 00 00 01 00 00 21 02 04 03 ............!...
0000020: 00 08 00 00 04 02 00 00 00 01 00 00 22 05 01 04 ............"...
0000030: 00 04 00 00 04 03 00 00 00 01 00 00 12 04 05 01 ................
0000040
@rxw1
rxw1 / config.h
Created November 28, 2012 08:55
dwm config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-ypn-envypn-medium-r-normal--*-150-*-*-*-90-iso8859-1";
static const char dmenufont[] = "-ypn-envypn-medium-r-normal--0-0-75-75-c-0-iso8859-1";
//static const char font[] = "Envy Code R:pixelsize=15:antialias=true:autohint=true";
//static const char dmenufont[] = "Envy Code R:pixelsize=18:antialias=true:autohint=true";
static const char normbordercolor[] = "#f4edda"; // light grey
static const char normbgcolor[] = "#f4edda";
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "Envy Code R:pixelsize=14:antialias=true:autohint=true";
static const char dmenufont[] = "Envy Code R:pixelsize=18:antialias=true:autohint=true";
/*
static const char normbordercolor[] = "#f4edda"; // light grey
static const char normbgcolor[] = "#f4edda";
static const char normfgcolor[] = "#000000";
@rxw1
rxw1 / domian.rb
Last active December 28, 2015 09:19
Download some files from some website… Note: Don't use it. It's a little bit evil.
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
#
# Fri Nov 15 03:21:26 CET 2013
#
require 'nokogiri'
require 'open-uri'
require 'fileutils'
@rxw1
rxw1 / gmail-download.rb
Created November 15, 2013 03:04
Downloads Gmail attachments of e-mails where the sender matches the given string.
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'gmail'
require 'fileutils'
require 'pry'
username = 'YOUR_MAIL_ADDRESS_HERE'
password = 'YOUR_PASSWORD_HERE'
@rxw1
rxw1 / countTabs.js
Last active December 30, 2015 07:49 — forked from jlewin/countTabs.js
Count open tabs in Google Chrome.
chrome.windows.getAll({populate: true}, function(a) {
var n=0;
for (var x in a) {
n+=a[x].tabs.length;
}
console.log(n);
});
// => undefined (?)
// => 154 :D