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
<snippet> | |
<content><![CDATA[ | |
/** | |
* @test: ${1:This is what we are testing} | |
* | |
* @return void | |
*/ | |
public function ${1/(\w)|(?: (\w))/(?1\l$1:)(?2_\l$2:)/g}() | |
{ | |
\$this->assertTrue(true); |
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
Route::resource('foo', 'FooController'); | |
// Specific methods for the relation between models | |
Route::resource('foo.bar', 'Foo\BarController'); // For accessing Bar related with Foo | |
Route::resource('foo.bar.bez', 'Foo\Bar\BezController'); // For accessing Bez related with Foo and Bar | |
Route::resource('foo.bar.bez.biz', 'Foo\Bar\Bez\BizController'); // For accessing Biz related with Foo, Bar and Bez | |
// General methods for each collection/resource | |
Route::resource('bar', 'BarController'); // For accessing bar | |
Route::resource('bez', 'BezController'); // For accessing bez |
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
Show hidden characters
{ | |
"binary_file_patterns": [".svn/", ".git/", ".hg/", "CVS/", "node_modules/", "bower_components/"], | |
} |
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
<snippet> | |
<content><![CDATA[ | |
<div class="form-group"> | |
<label for="${1:name}">${2}:</label> | |
<input type="text" class="form-control" id="${1}" name="${1}"/> | |
</div> | |
${0} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>bstext</tabTrigger> |
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
{# Get the categories related to my "entrySection" entries in structure order #} | |
{% set entries = craft.entries.section('entrySection') %} | |
{% set relatedCats = craft.categories.relatedTo(entries) %} | |
{# Loop the categories #} | |
{% for category in relatedCats %} | |
{{ category.title }} | |
{# Get and loop through entries related to this cat #} |
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
#!/bin/bash | |
# Sets 644 for files and 755 to directories in current directory and sub directories | |
find . -type d -exec chmod 0755 {} \; | |
find . -type f -exec chmod 0644 {} \; |
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
wget -mpk example.com |
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
#!/bin/sh | |
git rm -r --cached node_modules | |
git commit -m 'Remove node_modules directory' | |
git push origin master |
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
sudo -- sh -c 'apt update && apt upgrade -o Dpkg::Options::="--force-confold" --force-yes -y && apt autoremove -o Dpkg::Options::="--force-confold" --force-yes -y && apt autoclean -o Dpkg::Options::="--force-confold" --force-yes -y' |
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
wget -R _H -k -K -p --random-wait -e robots=off -U mozilla ***URL_HERE*** |
OlderNewer