This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
DisableRainmeterSkin() | |
{ | |
Envget, APPDATA, APPDATA | |
RainmeterINI = %APPDATA%\Rainmeter\Rainmeter.ini | |
VDMSection = Visions+\VDM Controller | |
VDMActiveKey = Active |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SleepLock: Simplest DLL ever to lock when resuming from sleep only. Designed to be injected into processes that call SetSuspendState. | |
* | |
* I feel dirty for attaching a license to something as simple as this. Nevertheless, the BSD licence is pretty much a free pass. | |
* | |
* Copyright (C) 2011 Faheem Pervez <[email protected]>. All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import gobject, dbus | |
from dbus.mainloop.glib import DBusGMainLoop | |
def screensaver_state_changed(isActive): | |
print "locked" if isActive else "unlocked" | |
DBusGMainLoop(set_as_default=True) | |
sess_bus = dbus.SessionBus() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//gcc -Wall bztest.c $(pkg-config --cflags --libs gio-2.0) | |
#include <stdlib.h> | |
#include <gio/gio.h> | |
#define NOPE(obj) \ | |
G_STMT_START \ | |
if (!obj) \ | |
{ \ | |
retval = EXIT_FAILURE; \ | |
goto exit; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#ifndef VK_MEDIA_NEXT_TRACK | |
#define VK_MEDIA_NEXT_TRACK 0xB0 | |
#endif | |
#ifndef VK_MEDIA_PREV_TRACK | |
#define VK_MEDIA_PREV_TRACK 0xB1 | |
#endif | |
#ifndef VK_MEDIA_STOP | |
#define VK_MEDIA_STOP 0xB2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Minimal < Formula | |
url 'http://ringwald.ch/fink/minimal-e327d27b214753a35b03a89886c82311c96353fa.tar.gz' | |
md5 '63926a804a44d5c36e8c0036ed653dbb' | |
end | |
class Ldid < Formula | |
homepage 'http://www.saurik.com/id/8' | |
url 'http://ringwald.ch/fink/ldid-4f4aa9c37a0c26908cafbc5ef58c94814d153415.tar.gz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
javac "$1" | |
if [ $? == 0 ]; then | |
#Thanks to Ken Pizzini: http://www.linuxmisc.com/12-unix-shell/4cd9a157aa806d45.htm | |
retval=`exec 3>&1; /opt/X11/bin/xterm -e sh -c '/usr/bin/java "'$2'" 3>&-; echo $? 1>&3; echo "Press ENTER to quit..."; read'` | |
rm "$2"*.class | |
exit $retval | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <sys/sysctl.h> | |
#import <stdlib.h> | |
#import <string.h> | |
int pidof(const char *argv) | |
{ | |
struct kinfo_proc *kp; | |
int mib[4],nentries,i; | |
size_t bufSize=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def determine_path | |
paths = [superbin] | |
+ if not ARGV.include? "--no-ccache"; paths.unshift "#{HOMEBREW_PREFIX}/Cellar/ccache/3.1.9/libexec:"; ENV.append 'CCACHE_DISABLE', "1"; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef brew | |
# Brew ZSH completion function | |
# Drop this somewhere in your $fpath (like /usr/share/zsh/site-functions) | |
# and rename it _brew | |
# | |
# altered from _fink | |
_brew_all_formulae() { | |
formulae=(`brew search`) |
OlderNewer