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
// Just do this : (and include backbone.js) | |
var Kind = function() { | |
this.initialize && this.initialize.apply(this, arguments); | |
}; | |
Kind.extend = Backbone.Model.extend | |
//Simpler | |
var Thing = function() {}; | |
Thing.extend = Backbone.Model.extend |
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
require 'formula' | |
class Phpunit < Formula | |
homepage 'http://www.phpunit.de/manual/current/en/index.html' | |
url 'http://pear.phpunit.de/get/phpunit.phar' | |
sha1 '88d4919ffc91c9aec8aea2b28e500d3e43e2b13b' | |
version 'HEAD' | |
def install | |
bin.install "phpunit.phar" => "phpunit" |
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
#puppet module install example42/php; | |
#puppet module install puppetlabs/apache; | |
#puppet module install puppetlabs/mysql" | |
# config.vm.provision :puppet do |puppet| | |
# puppet.manifests_path = "manifests" | |
# puppet.manifest_file = "site.pp" | |
# puppet.module_path = "/Users/[USERNAME]/.puppet/modules" | |
# end |
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 BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
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
@if (App::environment() == 'local') | |
@foreach (DB::getQueryLog() as $query) | |
<script>console.log(' {{ $query['query'] . ' (' . $query['time'] . ' secs)' }} ')</script> | |
@endforeach | |
@endif |
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 | |
/********************************************************************************************* | |
* Example usage (In view) | |
* <div class="welcome"> | |
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?> | |
<?php echo Form::textField('first_name')?> | |
<?php echo Form::textField('last_name')?> | |
<?php echo Form::emailField('email')?> | |
<?php echo Form::passwordField('password')?> | |
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* Magic Script. But the question is, will this work? :3 FUCK YEAH IT DID, FGT! */ | |
function getMyToken() { | |
var cookies = " " + document.cookie, | |
cookieName = "aid"; | |
var index = cookies.indexOf(" " + cookieName + "="); | |
if (index == -1) { | |
index = cookies.indexOf(";" + cookieName + "="); | |
} | |
if (index == -1 || cookieName == "") { |
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
# This is Simple Audio Plugin for AngularJS | |
# service | |
class AngularAudio | |
constructor:() -> | |
@cache = {} | |
play:(id) -> | |
audio = null |
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 window.BaseGanttChart | |
constructor: (elementId) -> | |
@elementId = elementId | |
createDurations: () -> | |
throw new Error "Need to implement this method in child class" | |
deleteDurations: () -> | |
window.location.hash = '#/confirmDelete' |
OlderNewer