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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:16px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script> |
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
<?php | |
/** | |
* Simple wrapper around the | |
* PHPUnit assertion library. | |
* | |
* Assert::equals(21, $age); | |
* Assert::greaterThan(20, $age); | |
* Assert::has('Joe', ['John', 'Joe']); | |
*/ |
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
set -o vi | |
# Aliases | |
alias sites="cd ~/Sites/" | |
alias desk="cd ~/Desktop/" | |
alias ..="cd ../" | |
alias ...="cd ../../" | |
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' | |
alias restartApache="sudo apachectl restart" | |
alias plugins="cd ~/.vim/bundle" |
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
@mixin category-colors($after: false) | |
@each $category in $categories | |
@if $after == true | |
.cat-#{nth($category, 1)}:after | |
background-color: nth($category, 2) | |
@else | |
.cat-#{nth($category, 1)} | |
background-color: nth($category, 2) |
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
property baseURL : "http://statusboard.dev/song?" | |
if application "Spotify" is running then | |
tell application "Spotify" | |
set theTrack to name of the current track | |
set theArtist to artist of the current track | |
set theAlbum to album of the current track | |
set theurl to spotify url of the current track | |
try | |
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |
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
tell application "Messages" | |
log in service "<work-account1>" | |
log in service "<work-account2>" | |
end tell | |
tell application "Mail" | |
set enabled of account "<work-account>" to true | |
end tell | |
tell application "OmniFocus" |
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
tell application "Messages" | |
log out service "<work-account1>" | |
log out service "<work-account2>" | |
end tell | |
tell application "Mail" | |
set enabled of account "<work-account>" to false | |
end tell | |
tell application "OmniFocus" |
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
// bookmarklet template for Pinswift | |
// This can be copied into a bookmarklet maker like: | |
// http://chriszarate.github.io/bookmarkleter/ | |
// Or used with Gruber's script | |
// http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
var href = location.href; | |
var path = 'pinswift://x-callback-url/add'; |
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
from flask import Flask, jsonify, request, Response, send_file | |
import youtube_dl | |
import eyed3 | |
""" | |
Workflow script: https://workflow.is/workflows/7b80d0daa48847ff867882bed7df8032 | |
Requires python installed with packages Flask, youtube_dl and eyed3 installed through pip | |
Required FFmpeg for mp3 conversion | |
""" | |
class SimpleYDL(youtube_dl.YoutubeDL): | |
def __init__(self, *args, **kargs): |