This file contains hidden or 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
gulp.task('phplint', function () { | |
exec('find . -type f -name "*.php" | xargs -n 1 php -d display_errors=1 -l | grep -v "No syntax errors"', function(error, stdout) { | |
console.log(stdout); | |
}); | |
}); |
This file contains hidden or 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
tag_my_repo() { | |
find ~/repositories/oliverlundquist/repotest -type d -maxdepth 1 -mindepth 1 | | |
xargs -I '{}' bash -c ' | |
PATH="$1" | |
VERSION="$2" | |
cd $PATH | |
git pull |
This file contains hidden or 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 handle() | |
{ | |
for($i=1; $i<=100; $i++) { | |
if ($i===1) { | |
\DB::table('transactions')->insert(['colorme_id' => $i]); | |
} else { | |
\DB::statement('insert into transactions(colorme_id) SELECT MAX(colorme_id)+1 from transactions'); | |
} | |
usleep(200000); | |
} |
This file contains hidden or 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
require 'rubygems' | |
require 'bundler/setup' | |
require 'uri' | |
require 'rest-client' | |
require 'json' | |
username = '' | |
password = '' | |
origin = "https://#{username}:#{password}@api.github.com/repos/kurashicom/cart/labels" | |
destination = "https://#{username}:#{password}@api.github.com/repos/kurashicom/evaluation/labels" |
This file contains hidden or 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 App; | |
use Illuminate\Database\Eloquent\ScopeInterface; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Model; | |
class ActiveScope implements ScopeInterface | |
{ | |
/** | |
* Apply the scope to a given Eloquent query builder. |
This file contains hidden or 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 | |
trait MetaProperties { | |
public $limit = 0; | |
public function setLimit($limit) { | |
$this->limit = $limit <= $this->maxCount ? $limit : $this->maxCount; | |
} | |
public function getLimit() { | |
return $this->limit; |
This file contains hidden or 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 | |
trait MetaProperties { | |
public function getLimit() { | |
return $this->limit; | |
} | |
public function setLimit($limit) { | |
$this->limit = $limit <= $this->maxLimit ? $limit : $this->maxLimit; | |
} | |
} |
This file contains hidden or 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 | |
class SymfonyFile extends SplFileInfo | |
{ | |
public function __construct($path, $originalName, $mimeType = null, $size = null) { | |
parent::__construct($path); | |
} | |
} | |
class FileHandler |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Graph 1</title> | |
<style> | |
body { | |
background-color:#eee; | |
text-align:center; | |
} |
This file contains hidden or 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
{ | |
"color_scheme": "Packages/Colorsublime - Themes/Github.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 13, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"trim_automatic_white_space": false, |
OlderNewer