This file contains hidden or 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 | |
xinput list | sed -ne 's/^[^ ][^V].*id=\([0-9]*\).*/\1/p' | while read id | |
do | |
case `xinput list-props $id` in | |
*"Middle Button Emulation"*) | |
xinput set-int-prop $id "Evdev Wheel Emulation" 8 1 | |
xinput set-int-prop $id "Evdev Wheel Emulation Button" 8 2 | |
xinput set-int-prop $id "Evdev Wheel Emulation Timeout" 8 200 | |
xinput set-int-prop $id "Evdev Wheel Emulation Axes" 8 6 7 4 5 | |
xinput set-int-prop $id "Evdev Middle Button Emulation" 8 0 |
This file contains hidden or 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/php | |
<? // just ./spotify.php | |
$api = array( | |
'context' => stream_context_create(array('http'=>array('method'=>'GET'))), | |
'ns' => 'spotify', | |
'url' => 'http://ws.spotify.com/search/1/track.json?q=', | |
); | |
fwrite(STDOUT, 'Pick a song: '); |
This file contains hidden or 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
(function() { | |
var aintShit = NothingEnum.nothing; | |
function changeShit() { | |
var from = prompt('Change:', ''); | |
var to = prompt('To:', ''); | |
app.findGrepPreferences.findWhat = from; | |
app.changeGrepPreferences.changeTo = to; | |
app.documents.item(0).changeGrep(); |
This file contains hidden or 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
git clone https://github.com/facebook/phpsh.git && cd phpsh && sudo python setup.py build && sudo python setup.py install |
This file contains hidden or 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
function deParam (params, coerce) { | |
var obj = {}; | |
var coerce_types = { 'true': !0, 'false': !1, 'null': null }; | |
var decode = decodeURIComponent; | |
// Iterate over all name=value pairs. | |
$.each(params.replace(/\+/g, ' ').split('&'), function(j, v){ | |
var param = v.split( '=' ), | |
key = decode(param[0]), | |
val, |
This file contains hidden or 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
" vim600: set foldmethod=marker: | |
" $Id:$ | |
" PURPOSE: {{{ | |
" - FindFile: Switch to an auto-completing buffer to open a file quickly. | |
" | |
" REQUIREMENTS: | |
" - Vim 7.0 | |
" | |
" USAGE: | |
" Put this file in your ~/.vim/plugin directory. |
NewerOlder