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
HTML::macro('unlock_delete', function($url, $message = 'Confirm delete?', $class = "") | |
{ | |
return " | |
<div class='btn-group'> | |
<span class='btn {$class} btn-danger disabled' data-url=\"" . url($url) . "\" data-message=\"{$message}\"> | |
<i class='icon-remove'></i> | |
</span> | |
<span class='btn {$class} unlock-btn'> | |
<i class='icon-lock'></i> Unlock |
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
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
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
/** | |
* http://fabricjs.com/js/kitchensink/controller.js | |
* http://fabricjs.com/js/kitchensink/utils.js | |
* http://fabricjs.com/js/kitchensink/app_config.js | |
* http://fabricjs.com/events/ | |
* view-source:http://fabricjs.com/kitchensink/ | |
*/ | |
(function() { |
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
/** | |
* Sanitize string input | |
* @param string $dirty_html | |
* @return string | |
*/ | |
public static function purify( $dirty_html ) | |
{ | |
$config = HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.SafeIframe', true); | |
$config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo |
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
public static function search_contacts($terms) | |
{ | |
$terms = mysql_real_escape_string($terms); | |
$contact_results = Contact::where_account_user_id(Auth::user()->account_user_id) | |
->raw_where("match (`first`, `last`) against ('{$terms}*' IN BOOLEAN MODE)") | |
->where_deleted(0) | |
->paginate(20); | |
phpconsole($contact_results->results); |
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
<IfModule mod_rewrite.c> | |
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] | |
</IfModule> |
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
public function get_checkin_poll() | |
{ | |
$filepath = 'storage/work/checkin_poll_' . Auth::user()->id; | |
$last_cycle = File::get($filepath); | |
$break = false; | |
$thread = uniqid(); | |
// if last cycle was > 60 secs continue |
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
public static function read_search($terms, $limit = 20) | |
{ | |
$contact_results = Contact::where_account_user_id(Auth::user()->account_user_id) | |
->where_deleted(0) | |
->where_marketing(0) | |
->where_mass_merge(0) | |
->raw_where("match (`first`, `last`) against (?)", array($terms)) | |
->take($limit) | |
->get(); |
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
var uploader = (function(){ | |
var r = Resumable({ | |
target: '/upload/stream', | |
chunkSize: 1*1024*1024, | |
query: { | |
serie_id: {{ $serie->id }} | |
} | |
}), |
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
commands: | |
01updateComposer: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update && | |
02installVendors: | |
command: /usr/bin/composer.phar install --no-dev | |
option_settings: | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: COMPOSER_HOME | |
value: /root |
NewerOlder