Skip to content

Instantly share code, notes, and snippets.

View florianeckerstorfer's full-sized avatar

Florian Eckerstorfer florianeckerstorfer

View GitHub Profile
<?php
namespace com\florianeckerstorfer\LastFm;
/**
* @package com.florianeckerstorfer.lastfm
* @author Florian Eckerstorfer <[email protected]>
* @link http://florianeckerstorfer.com Florian Eckerstorfer
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3
* @copyright 2010 Florian Eckerstorfer
@florianeckerstorfer
florianeckerstorfer / gist:2152939
Created March 21, 2012 21:19
Responsive.is Bookmarklet
javascript:location.href='http://responsive.is/'+location.href.replace(/http:\/\//,'').replace(/\/$/,'');
@florianeckerstorfer
florianeckerstorfer / gist:3360282
Created August 15, 2012 13:43
sublime preferences
{
"theme": "Soda Light.sublime-theme",
"color_scheme": "Packages/solarized-sublimetext2/Solarized (dark).tmTheme",
"font_face": "Inconsolata",
"font_size": 14.0,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
@florianeckerstorfer
florianeckerstorfer / ch2s.applescript
Created August 31, 2012 09:38
Opens the current URL from Google Chrome in Safari
(*
Opens the current URL from Google Chrome in Safari
Sources:
- https://discussions.apple.com/message/15728092#15728092
- https://culturedcode.com/things/wiki/index.php/Chrome_to_Things_(AppleScript)
*)
property theURL : ""
tell application "Google Chrome"
@florianeckerstorfer
florianeckerstorfer / s2ch.applescript
Created August 31, 2012 09:43
Opens the current URL from Safari in Google Chrome
(*
Opens the current URL from Safari in Google Chrome
Sources:
- http://stackoverflow.com/questions/6007338/how-to-open-a-new-tab-in-background-in-chrome-using-applescript
- http://www.tuaw.com/2011/03/14/use-applescript-to-open-current-safari-url-in-google-chrome/
*)
property theURL : ""
tell application "Safari"
set theURL to URL of current tab of window 1
@florianeckerstorfer
florianeckerstorfer / vlc-notification-center.scpt
Last active September 17, 2017 16:36
Automatically disable OS X Notification Center when VLC is playing a video in fullscreen mode. The script also enabled NC again when the video is paused, full screen mode is left or VLC is quit.
-- You need to open AppleScript Editor, paste the code and adapt the pListFile variable
-- Then export the script (File > Export) and save it as an application (activate "Stay open after run handler")
global plistFile
on run
-- The plist file will be different on your system. You can find out the filename by running the following line in a terminal window
-- $ ls ~/Library/Preferences/ByHost/com.apple.notificationcenterui.*.plist
set plistFile to "~/Library/Preferences/ByHost/com.apple.notificationcenterui.C9C4D4C4-E6DF-59FC-9BF4-25514282C806.plist"
checkStatus()
@florianeckerstorfer
florianeckerstorfer / nc.txt
Created May 30, 2013 22:16
Re-enables Notification Center on OS X if it has been disabled (either on purpose or if it just stopped showing up).
sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool true
open /System/Library/CoreServices/NotificationCenter.app
### Keybase proof
I hereby claim:
* I am florianeckerstorfer on github.
* I am florianec (https://keybase.io/florianec) on keybase.
* I have a public key whose fingerprint is AD41 E3CA 8312 BBAD D457 663B DBAE B611 6742 F61F
To claim this, I am signing this object:
@florianeckerstorfer
florianeckerstorfer / README.md
Last active August 29, 2015 14:14
Hide Sidebar in IRCCloud

Copy the following code (or copy the content of irccloud.userscript.js) and configure a user script for *irccloud.com* in Fluid (or whatever you are using).

$('body').append('<script src="http://cdn.florian.ec/irccloud.userscript.js"></script>');
@florianeckerstorfer
florianeckerstorfer / ocrcomment
Last active December 15, 2015 02:01
OCRs an image and adds the extracted text as Spotlight comment
#!/usr/bin/env php
<?php
/**
* ocrcomment INPUT
* ================
*
* > Takes an image, performs OCR and stores the text as Spotlight comment
* > BAM! You can search for your images using Spotlight.
*
* By Florian Eckerstorfer (https://florian.ec, @Florian_)