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 | |
/** | |
* Reverse a CamelCase string. | |
* | |
* Examples: | |
* uncamel('lowerCamelCase') === 'lower_camel_case' | |
* uncamel('UpperCamelCase') === 'upper_camel_case' | |
* uncamel('ThisIsAString') === 'this_is_a_string' | |
* uncamel('notcamelcase') === 'notcamelcase' | |
* uncamel('lowerCamelCase', ' | ') === 'lower | camel | case' |
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
// | |
// RKObjectManager+PutQueryParams.h | |
// | |
// | |
#import "RKObjectManager.h" | |
@interface RKObjectManager (PutQueryParams) | |
/** |
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
## | |
# Shell provisioner for LAMP | |
# Tested on Ubuntu 12.04 | |
## | |
# Detect environment | |
source /etc/os-release | |
# Set non-interactive mode | |
export DEBIAN_FRONTEND=noninteractive |
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
#pragma mark - Facebook App Invite Delegate | |
- (void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results | |
{ | |
NSLog(@"app invite result: %@", results); | |
BOOL complete = [[results valueForKeyPath:@"didComplete"] boolValue]; | |
NSString *completionGesture = [results valueForKeyPath:@"completionGesture"]; | |
// NOTE: the `cancel` result dictionary will be |
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
<snippet> | |
<content><![CDATA[ | |
/** | |
* ${1:Get the Var} | |
* | |
* @return ${2:string} | |
*/ | |
public function get${3:Var}() | |
{ | |
return \$this->${4:var}; |
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 | |
//...your silex bootstrap. | |
//Configure Swiftmail to use SMTP. | |
$app->register(new SwiftmailerExtension(), array( | |
'swiftmailer.options' => array( | |
'host' => 'smtp.gmail.com', | |
'port' => 465, | |
'username' => 'silex.swiftmailer@gmail.com', |
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
LogFormat "%h %l %u %t \"%m http://%{Host}i%U %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" hostnames | |
CustomLog "/private/var/log/apache2/access_log" hostnames |
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
# This script has to be run as a root user | |
echo "* Updating system" | |
apt-get update | |
apt-get -y upgrade | |
echo "* Installing packages" | |
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
id -u deploy &> /dev/null | |
if [ $? -ne 0 ] |
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 | |
/** | |
* This class is used in Orbisius Price Changer for WooCommerce | |
* This premium WooCommerce extension allows you to change product prices (up/down) for all products or for a selected category and its subcategories. | |
* You can review them before actually making the changes. | |
* | |
* @see http://club.orbisius.com/products/wordpress-plugins/woocommerce-extensions/orbisius-woocommerce-ext-price-changer/ | |
* @author jaywilliams | myd3.com | https://gist.github.com/jaywilliams | |
* @author Svetoslav Marinov (SLAVI) | http://orbisius.com |
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
with AWS.Status; | |
with AWS.Response; | |
package Worker_Echoes.Apple.Captive is | |
function Service (Request : AWS.Status.Data) | |
return AWS.Response.Data; | |
end Worker_Echoes.Apple.Captive; |
OlderNewer