Procedural Animated Gears
See the full Fractal Gears experiment: http://brm.io/gears/
More of the source at: https://github.com/liabru/gears-d3-js
| /** | |
| * JQuery plugin SimplePlugin v 1.0 [26.05.14 10:59] | |
| * TODO: DESCRIPTION | |
| * Created by ... | |
| * Contacts: ... | |
| */ | |
| // don't declare anything out here in the global namespace | |
| (function($) { // create private scope (inside you can use $ instead of jQuery) |
| # /etc/nginx/global/php-restrictions.conf | |
| # Don't throw any errors for missing favicons and don't display them in the logs | |
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| # Don't log missing robots or show them in the nginx logs | |
| location = /robots.txt { | |
| allow all; |
| <?php | |
| function array_diff_assoc_recursive($aArray1, $aArray2) { | |
| $aReturn = array(); | |
| foreach ($aArray1 as $mKey => $mValue) { | |
| if (! array_key_exists($mKey, $aArray2)) { | |
| $aReturn[$mKey] = $mValue; | |
| continue; | |
| } |
| <?php | |
| //... | |
| Route::filter('http_cache', function($route, $request, $value = 30, $response = null) | |
| { | |
| if ($value instanceof \Illuminate\Http\Response) { | |
| list($response, $value) = [$value, $response]; | |
| } | |
| $key = 'route-'.md5(Auth::id().Request::fullUrl().Request::method()); | |
| $route->after('http_cache:'.$value); | |
| if ( is_null($response) && Cache::has($key) ) { |
| <?php | |
| use Illuminate\Support\Facades\Facade; | |
| /** | |
| * @see \Ellrion\SimpleSecurity\Security | |
| */ | |
| class SecurityFacade extends Facade { | |
| /** |
Procedural Animated Gears
See the full Fractal Gears experiment: http://brm.io/gears/
More of the source at: https://github.com/liabru/gears-d3-js
| <?php | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Database\Eloquent\ScopeInterface; | |
| class ActivityStatusScope | |
| implements ScopeInterface | |
| { | |
| const STATUS_FIELD = 'status'; | |
| const ACTIVE = 1; |
| <?php | |
| use Illuminate\Database\Eloquent\Model; | |
| class ModelWithScope extends Model | |
| { | |
| use SelectableTrait; | |
| protected $selectable = [ | |
| 'id', 'title', 'created_at' |
| <?php | |
| class LanguageDetector | |
| { | |
| private $languages = []; | |
| public function __construct($enabledLanguages) | |
| { | |
| $this->languages = (array)$enabledLanguages; | |
| } |
ls – список файлов и каталоговls -al – форматированный список со скрытыми каталогами и файламиcd dir – сменить директорию на dircd – сменить на домашний каталогpwd – показать текущий каталогmkdir dir – создать каталог dirrm file – удалить filerm -r dir – удалить каталог dirrm -f file – удалить форсированно file