most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| /* WITH MODS TO ORIG -- iOS Browser Bookmarklets to launch other apps and stuff */ | |
| /* ver 2014-04-14a */ | |
| /* backing up my "Open In" bookmarks */ | |
| // note iOS6 requires some changes to these | |
| // BEGIN TESTING STUFF -- IN PROFRESS LIKELY NOT WORKING | |
| // SOME WORK, MOST tests are not WORK -- | |
| // PINNER APP TEST STUFF (as a private one) | |
| // the page title as the title and your selected text as the description. |
| <?php | |
| //returns a big old hunk of JSON from a non-private IG account page. | |
| function scrape_insta($username) { | |
| $insta_source = file_get_contents('http://instagram.com/'.$username); | |
| $shards = explode('window._sharedData = ', $insta_source); | |
| $insta_json = explode(';</script>', $shards[1]); | |
| $insta_array = json_decode($insta_json[0], TRUE); | |
| return $insta_array; | |
| } |
| // this is the background code... | |
| // listen for our browerAction to be clicked | |
| chrome.browserAction.onClicked.addListener(function (tab) { | |
| // for the current tab, inject the "inject.js" file & execute it | |
| chrome.tabs.executeScript(tab.ib, { | |
| file: 'inject.js' | |
| }); | |
| }); |
| Install Composer: curl -sS https://getcomposer.org/installer | php | |
| Move to global: sudo mv composer.phar /usr/local/bin/composer | |
| Check Composer: php composer.phar | |
| Install Laravel: composer create-project laravel/laravel (directory) | |
| cd (directory) | |
| run on port: php -S localhost:8000 -t public |
| #EXTM3U | |
| #EXTINF:-1,Digitally Imported - Ambient | |
| http://pub1.diforfree.org:8000/di_ambient_hi | |
| #EXTINF:-1,Digitally Imported - Big Room House | |
| http://pub1.diforfree.org:8000/di_bigroomhouse_hi | |
| #EXTINF:-1,Digitally Imported - Breaks | |
| http://pub1.diforfree.org:8000/di_breaks_hi |
| #!/usr/bin/env perl | |
| # Basic Telegram Bot implementation using WWW::Telegram::BotAPI | |
| use strict; | |
| use warnings; | |
| use WWW::Telegram::BotAPI; | |
| my $api = WWW::Telegram::BotAPI->new ( | |
| token => (shift or die "ERROR: a token is required!\n") | |
| ); |
| (* | |
| Even though [a native solution](http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os) exists, it still suffers from a big flaw (it right-clicks the place you cursour is, not what you’re selecting). This addresses that limitation. | |
| You can install this as a [Finder Service, , and later asign it a keyboard shortcut](http://www.macosxautomation.com/services/learn/tut01/index.html). | |
| *) | |
| tell application "System Events" to set frontApp to name of first process whose frontmost is true |
| function sendForm() { | |
| var fileData = new FormData(document.getElementById("cpd-file")); | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open("POST", "/upload_file", true); | |
| xhr.setRequestHeader('Accept', 'application/json'); | |
| xhr.onload = function(progressEvent) { | |
| if (xhr.status == 200) { | |
| console.log('Uploaded', xhr); | |
| } else { |