Skip to content

Instantly share code, notes, and snippets.

View JayDugger's full-sized avatar

Jay Dugger JayDugger

View GitHub Profile
@JayDugger
JayDugger / Disable Vista UAC
Created May 14, 2009 03:21
Troubleshooting Notes
Here's how to do it:
UAC, otherwise known as UAP (User Account Control/User Account Protection) in previous builds is another one of those features that just seems to get in the way of doing your work. This feature is designed with the average user in mind who needs this kind of protection to keep themselves out of trouble. If you are reading this then chances are you know how to manage your own system. Here is how to disable UAP:
1. Press the Windows Key + R (winkey + R).
2. At the run prompt, type "msconfig" without the quotes.
3. Go to the Tools tab, scroll down and select "Disable UAP" and click the run button.
4. You should see a command prompt open and it will say "Command completed successfully".
5. Reboot and enjoy the freedom to control your system as you wish.
Lillebror is offline
import XMonad
import XMonad.Config.Gnome
main = xmonad gnomeConfig
{ modMask = mod4Mask
}
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
Instructions:
1. Set your Gnome theme as you would like it
2. Run with a command like "python wine_colors_from_gtk.py"
3. Restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper
ACCOUNT@HOST:PATH$ find ../f/ -type f -iname "*.cb[rz]" -print0 | xargs -0 calibredb add | less
Traceback (most recent call last):
File "site-packages/calibre/customize/ui.py", line 350, in get_file_type_metadata
File "site-packages/calibre/customize/builtins.py", line 103, in get_metadata
File "site-packages/calibre/libunrar.py", line 280, in extract_first_alphabetically
File "site-packages/calibre/libunrar.py", line 208, in names
UnRARException: /tmp/tmpTs7Yc9.rar is not a RAR archive.
Traceback (most recent call last):
File "site-packages/calibre/customize/ui.py", line 350, in get_file_type_metadata
File "site-packages/calibre/customize/builtins.py", line 103, in get_metadata
@JayDugger
JayDugger / church.py
Created April 21, 2012 18:23 — forked from vivekhaldar/church.py
Church numerals in Python
#! /usr/bin/python
#
# Church numerals in Python.
# See http://en.wikipedia.org/wiki/Church_encoding
#
# Vivek Haldar <vh@vivekhaldar.com>
#
# https://gist.github.com/2438498
zero = lambda f: lambda x: x
@JayDugger
JayDugger / row-row-row-your-boat.clj
Created June 16, 2012 17:30 — forked from ctford/row-row-row-your-boat.clj
Row, row, row your boat!
(ns overtunes.songs.row-row-row-your-boat
(:use
[overtone.live]))
(definst harpsichord [freq 440]
(let [duration 1]
(*
(line:kr 1 1 duration FREE)
(pluck (* (white-noise) (env-gen (perc 0.001 5) :action FREE))
1 1 (/ 1 freq) (* duration 2) 0.25))))
@JayDugger
JayDugger / stack-trace for ditaa trouble
Created September 2, 2012 15:56
Emacs debugger output for ditaa troubleshooting
Debugger entered--Lisp error: (void-function org-labels)
(org-labels ((intersect (as bs) (when as (if (member (car as) bs) (car as) (intersect (cdr as) bs))))) (intersect (case context (:tangle (quote ("yes" "tangle" "no-export" "strip-export"))) (:eval (quote ("yes" "no-export" "strip-export" "eval"))) (:export (quote ("yes")))) (split-string (or (cdr (assoc :noweb params)) ""))))
org-babel-noweb-p(((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "results") (:results . "replace file") (:session . "none") (:hlines . "no") (:padnewline . "yes") (:java . "-Dfile.encoding=UTF-8") (:result-type . value) (:result-params "file" "replace") (:rowname-names) (:colname-names)) :eval)
(if (org-babel-noweb-p params :eval) (org-babel-expand-noweb-references info) (nth 1 info))
(setcar (nthcdr 1 info) (if (org-babel-noweb-p params :eval) (org-babel-expand-noweb-references info) (nth 1 info)))
(setf (nth 1 info) (if (org-babel-noweb-p params :eval) (org
@JayDugger
JayDugger / babel block
Created September 2, 2012 16:21
more ditaa org-babel troubleshooting
#+BEGIN_SRC ditaa :file some_filename.jpg :cmdline -r -s 0.8
+--------------------+
|This is only a test.|
+--------------------+
#+END_SRC
@JayDugger
JayDugger / opml2org.pl
Created October 1, 2012 15:01 — forked from alandipert/opml2org.pl
Convert OPML to org-mode style nested headings, suitable for Confluence or Emacs
#!/usr/bin/perl
# Usage: perl opml2org.pl "My OPML File.opml"
use XML::Parser;
binmode STDOUT, ":utf8";
$xp = new XML::Parser();
$xp->setHandlers(Start => \&start, End => \&end);
$xp->parsefile($ARGV[0]);
$indent = 0;
@JayDugger
JayDugger / youtube.lua
Created October 19, 2012 02:28 — forked from boyvanamstel/youtube.lua
Fixed VLC youtube.lua parser
-- Apparently YouTube changed some stuff. This makes VLC play YouTube clips again.
-- Replace youtube.lua in /Applications/VLC.app/Contents/MacOS/share/playlist/youtube.lua.
-- Ticket @ VLC: https://trac.videolan.org/vlc/ticket/7471
--[[
$Id$
Copyright © 2007-2011 the VideoLAN team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by