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 tourApp = { | |
tabSteps: { | |
8: 'images', | |
12: 'users' | |
}, | |
needsTweaking: function(i) { | |
return typeof tourApp.tabSteps[i] != 'undefined'; | |
}, | |
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 | |
$x = function($bar, $foo="9") { | |
echo $foo, $bar, "\n"; | |
}; | |
class MissingArgumentException extends Exception { | |
} | |
function call_user_func_named_array($method, $arr){ |
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
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
* |
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
Class Task extends ActiveRecord\Model | |
{ | |
public static $table = 'tasks'; | |
public function set_history($history) | |
{ | |
$this->assign_attribute('history', serialize($history)); | |
} |
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 | |
class swDFPBaseModule | |
{ | |
private function parent_or_child($tax, $query_key) | |
{ | |
$slug = $wp_query->query_vars[$query_key] | |
$s = get_term_by('slug', $slug, $tax); | |
return ($s->parent>0) ? | |
'get_on_'.$tax.'_page' : 'get_on_child_'.$tax.'_page'; |
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
package main | |
import akka.actor.ActorSystem | |
import akka.stream.{ActorMaterializer, ActorAttributes} | |
import akka.stream.scaladsl._ | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
object StreamProgram { | |
implicit lazy val system = ActorSystem("example") |
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 | |
//Class to provide factory methods for seamless use | |
class UploadedFile extends CComponent | |
{ | |
public function init() | |
{ | |
parent::init(); | |
} |
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
class Player extends Post | |
{ | |
private $_points = false; | |
public static $after_save = array('update_points'); | |
public function set_points($points) | |
{ | |
$this->_points = $points; | |
} |
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
execute pathogen#infect() | |
syntax on | |
set shiftwidth=2 | |
set tabstop=2 | |
set expandtab | |
set autoindent | |
set tags=~/tags | |
set backspace=2 | |
let &colorcolumn=join(range(81,999),",") | |
highlight ColorColumn ctermbg=255 guibg=#b5baa9 |
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
package sample | |
import scala.language.implicitConversions | |
import shapeless._ | |
import shapeless.Everywhere | |
import ops.hlist.{Align, Mapper, Prepend} | |
import poly._ | |
import record._ | |
import syntax.singleton._ | |
import shapeless.tag |