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
/* SOURCE URL */ | |
http://www.printableworldflags.com/flag-icon | |
/* CREATE TRANSPARENT FILL 32x32 */ | |
convert -size 32x32 xc:transparent -fill 'rgba(180, 180, 180, 0.8)' -draw 'rectangle 0,0 32,32' trans.png | |
/* CREATE SEMI-TRANS IMAGE (mix flag.png & trans.png) */ | |
composite -dissolve 50% flag.png trans.png hover_flag.png |
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 | |
use WindowsAzure\Common\ServicesBuilder; | |
use WindowsAzure\Common\ServiceException; | |
Class Worker_Task { | |
public $queueRestProxy; | |
public $servicesBuilder; |
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 | |
/** | |
* Socket wrapper class used by Socket Adapter | |
* | |
* PHP version 5 | |
* | |
* LICENSE: | |
* | |
* Copyright (c) 2008-2012, Alexey Borzov <avb@php.net> | |
* All rights reserved. |
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 namespace MyApp; | |
class Mailer extends \Illuminate\Mail\Mailer { | |
/** | |
* Render the given view. | |
* | |
* @param string $view | |
* @param array $data | |
* @return \Illuminate\View\View |
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 | |
/* 1. Add the dependency to your composer.json. | |
// I'm using https://packagist.org/packages/tijsverkoyen/css-to-inline-styles | |
*/ | |
/* 2. Extend \Illuminate\Mail\Mailer to override the getView() method | |
// app/libraries/MyApp/Mailer.php | |
*/ | |
namespace MyApp\Mail; |
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 | |
// In /app/models/User.php | |
use Cartalyst\Sentry\Users\Eloquent\User as SentryUserModel; | |
class User extends SentryUserModel {} | |
// In /app/config/packages/cartalyst/sentry/config.php *Omited some parts for brevity | |
return array( | |
'users' => array( |
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
namespace :server do | |
desc "Tail server log" | |
task :tail do | |
on roles(:app) do | |
trap("INT") { puts puts "\e[0;36mInterrupted\e[1;0m"; exit 0; } | |
trap("SIGINT") { puts puts "\e[0;36mInterrupted\e[1;0m"; exit 0; } | |
latest_log = capture(sprintf("ls -tr /var/www/%s/shared/app/storage/logs/*.txt | tail -1 | head -1", fetch(:stage))) | |
if(!latest_log.empty?) |
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 | |
use Illuminate\Routing\Controller; | |
class BaseController extends Controller | |
{ | |
public function __construct() | |
{ | |
$this->beforeFilter(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
hash: { | |
options: { | |
mapping: 'public/assets.json', | |
flatten: false, | |
hashLength: 8, | |
hashFunction: function(source, encoding) { | |
return require('crypto').createHash('sha1').update(source, encoding).digest('hex'); | |
} | |
}, | |
js: { |
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
angular.module('api', []) | |
.factory('Photos', ['$http', function ($http) { | |
return { | |
items: [], | |
busy: true, | |
stadium_id: null, | |
max_id: null, | |
hasMore: true, | |
resetItems: function () { | |
this.items = []; |
OlderNewer