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
#lang cmark-scribble | |
# This is a test document | |
1 + 1 is **@+[1 1]** |
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
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
set iTunesRunning to is_running("iTunes") | |
set noMusic to "no music is playing" | |
set song to noMusic | |
if iTunesRunning then | |
set song to run script "tell application \"iTunes\" to if player state is playing then \"now playing: \" & name of current track & \" by \" & artist of current track" |
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
<?php | |
$secretword = "secret"; # Change this before use | |
$matches = null; | |
if (!empty($_REQUEST['AUTH']) && preg_match('/^(\w++):(\d++):(\w++)$/', $_REQUEST['AUTH'], $matches)) { | |
$username = str_rot13($matches[1]); | |
$time = (int)$matches[2]; | |
$authhash = $matches[3]; | |
$logged_in = md5($username . $time . $secretword) === $authhash && $time >= time() - 3000; | |
} |