On http://code.google.com/p/YOUR_PROJECT/adminSource :
Post-Commit URL: http://yoursite.com/postcommit.php
<?php
set_time_limit ( 180 ); // zomgOn http://code.google.com/p/YOUR_PROJECT/adminSource :
Post-Commit URL: http://yoursite.com/postcommit.php
<?php
set_time_limit ( 180 ); // zomg| #!/bin/bash | |
| # Simple bash script to generate YOURLS nightly builds | |
| # Export in a year-month-day directory | |
| PWD="/home/ozh/yourls.org/nightly-builds" | |
| BUILD=$(date +%Y-%m-%d) | |
| svn -q export http://yourls.googlecode.com/svn/trunk/ $PWD/$BUILD | |
| # Make package and remove dir | |
| cd $PWD |
| // Share on Facebook | |
| var d = document, | |
| enc = encodeURIComponent, | |
| share = 'facebook', | |
| f = 'http://sho.rt/admin/index.php', | |
| l=d.location.href, | |
| ups=l.match( /^[a-zA-Z0-9\+\.-]+:(\/\/)?/ )[0]; | |
| var ur=l.split(new RegExp(ups))[1]; | |
| var ups=ups.split(/\:/); |
| <?php | |
| /** | |
| * This function computes a hash of an integer. This can be used to not expose values to a customer, such as | |
| * not giving them the id value for passing them to URLs. This algorithm is a bidirectional encryption (Feistel cipher) that maps | |
| * the integer space onto itself. | |
| * | |
| * @link http://wiki.postgresql.org/wiki/Pseudo_encrypt Algorithm used | |
| * @link http://en.wikipedia.org/wiki/Feistel_cipher Wikipedia page about Feistel ciphers | |
| * @param int $value |
List of stuff the "phone home" YOURLS function will report:
about:configdevtools.responsiveUI.presets| function is_flash_enabled() { | |
| var hasFlash = false; | |
| try { | |
| var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
| if( fo ) hasFlash = true; | |
| } catch(e) { | |
| if( navigator.mimeTypes ["application/x-shockwave-flash"] != undefined ) | |
| hasFlash = true; | |
| } | |
| return hasFlash; |
| <?php | |
| function request_path() { | |
| $request_uri = explode('/', trim($_SERVER['REQUEST_URI'], '/')); | |
| $script_name = explode('/', trim($_SERVER['SCRIPT_NAME'], '/')); | |
| $parts = array_diff_assoc($request_uri, $script_name); | |
| if (empty($parts)) { | |
| return '/'; | |
| } | |
| $path = implode('/', $parts); |
| /* That's right bitches */ | |
| @keyframes blink { | |
| 0% { opacity:1; } 75% { opacity:1; } 76% { opacity:0; } 100% { opacity:0; }} | |
| @-webkit-keyframes blink { | |
| 0% { opacity:1; } 75% { opacity:1; } 76% { opacity:0; } 100% { opacity:0; }} | |
| @-moz-keyframes blink { | |
| 0% { opacity:1; } 75% { opacity:1; } 76% { opacity:0; } 100% { opacity:0; }} | |
| @-ms-keyframes blink { | |
| 0% { opacity:1; } 75% { opacity:1; } 76% { opacity:0; } 100% { opacity:0; }} |
| <?php | |
| class BaseEncDec { | |
| public $alphabet; | |
| public $base; | |
| public function __construct( $alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ) { | |
| $this->alphabet = $alphabet; | |
| $this->base = strlen( $alphabet ); | |
| } |