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 $input = $('#my-input'); | |
if(!$input.val()) { | |
$input.toggleVal({ | |
populateFrom: 'custom', | |
text: 'Default value' | |
}); | |
} |
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 Auth extends CI_Controller { | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->load->spark('yall/0.2.0'); // not needed if autoloaded | |
} |
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 | |
include 'str_format.php'; | |
// example 1 | |
echo str_format(':foo + :bar = :baz', array( | |
'foo' => 5, | |
'bar' => 6, | |
'baz' => 11, | |
)); |
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
[ | |
{ "keys": ["super+alt+left"], "command": "prev_view_in_stack" }, | |
{ "keys": ["super+alt+right"], "command": "next_view_in_stack" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" } | |
] |
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
# Initial setup | |
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name | |
cd project-name | |
git checkout --orphan master | |
git commit -m "Initial commit" | |
# Pulling changes | |
git fetch framework | |
git merge --squash -m "Upgrade Laravel" framework/develop | |
# Fix merge conflicts if any and commit |
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 | |
// app/commands/DeployCommand.php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class DeployCommand extends Command | |
{ |
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 | |
use Behat\Behat\Event\StepEvent; | |
use Behat\Behat\Event\SuiteEvent; | |
use Behat\MinkExtension\Context\MinkContext; | |
class FeatureContext extends MinkContext | |
{ | |
/** | |
* @AfterStep |