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
#!/bin/bash | |
# | |
# Adobe Air Installer for Ubuntu 64-bit Systems | |
# | |
# Pretty sure the name says it all, but if not, here's some more detail. Adobe | |
# Air is currently only supported on 32-bit Linux systems. Because of this you | |
# have to jump through some hoops to get it running. Specifically, you need to | |
# install 32-bit libraries to satisfy the dependencies of Adobe Air. This | |
# particular script makes it as easy as running a single script. | |
# |
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
/** | |
* JJ Slider (jQuery Slideshow) Plug-In | |
* | |
* http://github.com/joshtronic/jquery.jjslider | |
* | |
* Author: Josh Sherman <josh@crowdsavings.com> | |
* Copyright (c) 2010 Gravity Boulevard, LLC | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php |
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 | |
// Note, $xml is supposed to be SVG XML data | |
$image = new Imagick(); | |
$image->readImageBlob($xml); | |
$image->setImageFormat('png24'); | |
header('Content-type: image/png'); | |
ob_clean(); |
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
export KEYCHAIN_ITEM='email' && curl -u `security find-generic-password -s ${KEYCHAIN_ITEM} | grep 'acct' | cut -c 19- | tr -d '"' | tr -d '\n'`:`security find-generic-password -w -s ${KEYCHAIN_ITEM}` --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "$2\n" if /<(email)>(.*)<\/\1>/;' | wc -l | tr -d ' ' |
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
$('[data-plugin]').each(function(element) | |
{ | |
switch ($(element).data('plugin')) | |
{ | |
case 'tagsInput': | |
$(element).tagsInput({ width: 'auto' }); | |
break; | |
} | |
}); |
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 | |
$conditions = array('conditions' => array('revision_id' => $recipe_revision->record['id'])); | |
$cache_key = 'RECIPE-' . $recipe_revision->record['id'] . '-'; | |
$recipe_ingredient = new RecipeIngredient($conditions, $cache_key . 'INGREDIENTS'); | |
$recipe_direction = new RecipeDirection($conditions, $cache_key . 'DIRECTIONS'); |
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
// Checks that all of the fields are present and not null | |
if (isset($_POST['username'], $_POST['email'], $_POST['password']) | |
&& !String::isEmpty($_POST['username'], $_POST['email'], $_POST['password'])) | |
{ | |
// Checks that the username is the correct format | |
if (strlen($_POST['username']) > 32) | |
{ | |
$message = 'Usernames may not be more than 32 characters.'; | |
} | |
elseif (!preg_match('/^[a-z0-9-]+$/i', $_POST['username'])) |
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 | |
class user_create extends AnonymousModule | |
{ | |
protected $post = array( | |
'username' => array( | |
'length:>:32' => 'Usernames may not be more than 32 characters.', | |
'regex:/[^a-z0-9-]+/i' => 'Usernames may only contain alphanumeric characters or dashes.', | |
'regex:/^(-.+|.+-)$/' => 'Usernames may not start or end with a dash.', | |
'regex:/-{2,}/' => 'Usernames may not have two or more dashes in a row.', |
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 | |
if (isset($_SERVER['HTTP_USER_AGENT']) | |
&& !String::isEmpty($_SERVER['HTTP_USER_AGENT']) | |
&& !preg_match('/(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)/i', $_SERVER['HTTP_USER_AGENT'])) | |
{ | |
exit('EOF'); | |
session_start(); | |
} |
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 | |
$transaction = new Transaction(); | |
$model1 = new Model1(); | |
$model1->record['foo'] = 'bar'; | |
$model1->queue(); | |
$transaction->queue($model1); |
NewerOlder