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 | |
$identify = array( | |
'user_id' => $user->user_email, | |
'traits' => apply_filters( 'segment_identify_traits', array( | |
'username' => $user->user_login, | |
'email' => $user->user_email, | |
'name' => $user->display_name, | |
'firstName' => $user->user_firstname, | |
'lastName' => $user->user_lastname, | |
'url' => $user->user_url |
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
if (this.index >= w._cards.length-1) { | |
this.log("on last card, changing next button to submit"); | |
w.changeNextButton(w.args.buttons.submitText, "btn-success"); | |
w.saveAndContinueButton.removeClass("hide"); | |
w.saveAndAddAnotherButton.removeClass("hide"); | |
w._readyToSubmit = true; | |
w.trigger("readySubmit"); | |
} | |
else { |
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
#!/bin/bash | |
# | |
# using ec2 tools | |
# | |
# Marcus Vinicius Fereira ferreira.mv[ at ].gmail.com | |
# 2011-11 | |
### | |
### programs |
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
75.126.19.144/28 | |
75.126.23.16/28 | |
184.173.69.128/28 | |
50.97.157.0/26 | |
75.126.59.16/28 |
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
// see: http://coenraets.org/blog/2012/03/using-backbone-js-with-jquery-mobile/ | |
// for context. | |
// this modifies original code (above) to also watch for dialogs being hidden | |
$('div[data-role="page"],div[data-role="dialog"]').live('pagehide', function (event, ui) { | |
$(event.currentTarget).remove(); | |
}); |
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
<? | |
// Upload image from the filesystem | |
$ch = curl_init(); | |
$request = array('appkey'=>'YOUR_APPKEY_HERE', 'photo'=>'@/path/to/image.jpg'); | |
curl_setopt($ch, CURLOPT_URL, 'https://snapi.sincerely.com/shiplib/upload'); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $request); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$output = curl_exec($ch); |
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
//reference Date.js | |
if (!Utilities) var Utilities = {}; | |
$.extend(Utilities, | |
{ | |
Birthdate : function(lg) { | |
var Month = { | |
en : ["January","February","March","April","May","June","July","August","September","October","November","December"], | |
fr : ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"] | |
} |
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 | |
function i18nPOStrings() { | |
$locale = str_replace('-', '_', get_instance()->config->item('language_ui')->locale); | |
//$default = str_replace('-', '_', get_instance()->config->item('language_ui_default')->locale); | |
$dir = APPPATH . 'language/locale/' . $locale . '/LC_MESSAGES/'; | |
$files = glob($dir . '*.po'); | |
foreach ($files as $file) { | |
$contents .= file_get_contents($file) or die('Could not read from file.'); |
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
<script type="text/javascript"> | |
var getUrlParams = function() { | |
var params = {}, hash; | |
var hashes = decodeURI(window.location.href).replace(/\+/g," ").slice(window.location.href.indexOf('?') + 1).split('&'); | |
for (var i=0; i<hashes.length; i++) { | |
hash = hashes[i].split('='); | |
params[hash[0]] = hash[1]; | |
} | |
return params; | |
}; |