Skip to content

Instantly share code, notes, and snippets.

View mayoz's full-sized avatar
🧶
If you don't understand it, you can't change it!

Sercan Cakir mayoz

🧶
If you don't understand it, you can't change it!
View GitHub Profile
@coreymcmahon
coreymcmahon / ConcurrencyExample.php
Last active August 29, 2015 14:10
The 12 Factor PHP App: Concurrency example using Queues - http://slashnode.com/the-12-factor-php-app-part-2/
<?php
// this code is run by the "web" process
namespace App\Services;
class UserCreator
{
public function create($data)
{
// ... etc

LESS Coding Guidelines

Medium uses a strict subset of LESS for style generation. This subset includes variables and mixins, but nothing else (no nesting, etc.).

Medium's naming conventions are adapted from the work being done in the SUIT CSS framework. Which is to say, it relies on structured class names and meaningful hyphens (i.e., not using hyphens merely to separate words). This is to help work around the current limits of applying CSS to the DOM (i.e., the lack of style encapsulation) and to better communicate the relationships between classes.

Table of contents

@fadhlirahim
fadhlirahim / installing_supervisor_macosx.md
Last active December 31, 2023 14:45
Setting up supervisord in Mac OS X

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

@stevenmaguire
stevenmaguire / laravel-nearby-locations-query-scope.php
Last active March 28, 2020 22:40
Laravel (Illuminate) query builder scope to list neighboring locations within a given distance from a given location
<?php
/**
* Query builder scope to list neighboring locations
* within a given distance from a given location
*
* @param Illuminate\Database\Query\Builder $query Query builder instance
* @param mixed $lat Lattitude of given location
* @param mixed $lng Longitude of given location
* @param integer $radius Optional distance
@coreymcmahon
coreymcmahon / ServiceLayerExample.php
Created July 18, 2014 04:57
Example of using a service layer w/ the repository pattern - www.slashnode.com
<?php
/* UserRepository.php */
namespace Acme\Repositories;
class UserRepository extends AbstractRepository implements UserRepositoryInterface
{
// etc...
}
@laracasts
laracasts / ApiTester.php
Last active February 6, 2020 15:57
Incremental APISs: Refactoring Tests and Traits
<?php
use Faker\Factory as Faker;
abstract class ApiTester extends TestCase {
/**
* @var Faker
*/
protected $fake;

#AngularJS Application List Here is a list of some Angular Free Application / snippets to help you out with your projects

angular git://github.com/angular/bower-angular.git
angular-mocks git://github.com/angular/bower-angular-mocks.git
angular-resource git://github.com/angular/bower-angular-resource.git
angular-scenario git://github.com/angular/bower-angular-scenario.git
angular-cookies git://github.com/angular/bower-angular-cookies.git
angular-sanitize git://github.com/angular/bower-angular-sanitize.git

angular-bootstrap git://github.com/angular-ui/bootstrap-bower.git

@beratdogan
beratdogan / turkey_provinces_districts.json
Last active August 29, 2015 13:56
A huge list of provinces and their districts of Turkey in JSON format. Have fun!
[
{
"name":"Adana",
"slug":"adana",
"plate_code":1,
"districts":[
{
"name":"Alada\u011f",
"slug":"aladag"
},
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
@zaherg
zaherg / install.md
Last active October 18, 2020 17:45
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git