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
(function() { | |
// Adding upload button to Trix toolbar on initialization | |
document.addEventListener('trix-initialize', function(e) { | |
trix = e.target; | |
toolBar = trix.toolbarElement; | |
// Creation of the button | |
button = document.createElement("button"); | |
button.setAttribute("type", "button"); | |
button.setAttribute("class", "attach"); |
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 | |
/** | |
* Parses a template argument to the specified value | |
* Template variables are defined using double curly brackets: {{ [a-zA-Z] }} | |
* Returns the query back once the instances has been replaced | |
* @param string $string | |
* @param string $find | |
* @param string $replace | |
* @return string |
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
language: php | |
cache: | |
directories: | |
- $HOME/.cache/pip | |
- $HOME/.composer/cache/files | |
php: | |
- 5.6 | |
- 7.0 |
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 | |
// Make sure Carbon is available | |
function renderCalendar($dt) { | |
// Make sure to start at the beginnen of the month | |
$dt->startOfMonth(); | |
// Set the headings (weeknumber + weekdays) | |
$headings = ['Weeknumber', 'Mondag', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saterday', 'Sunday']; |
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
$config = \HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.DefinitionID', 'basecamp-trix-editor'); | |
$config->set('HTML.DefinitionRev', 1); | |
$config->set('HTML.TidyLevel', 'none'); | |
if ($def = $config->maybeGetRawHTMLDefinition()) { | |
$def->addElement('figure', 'Inline', 'Inline', 'Common'); | |
$def->addAttribute('figure', 'class', 'Text'); |
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
mix.js('resources/assets/js/app.js', 'public/js') | |
.scripts([ | |
'node_modules/datatables.net/js/jquery.dataTables.js', | |
'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js' | |
], 'public/js/datatable.js') | |
.styles(['node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css'], 'public/css/datatable.css') | |
.sass('resources/assets/sass/app.scss', 'public/css'); |
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
Continent_Name | Continent_Code | Country_Name | Two_Letter_Country_Code | Three_Letter_Country_Code | Country_Number | |
---|---|---|---|---|---|---|
Asia | AS | Afghanistan, Islamic Republic of | AF | AFG | 4 | |
Europe | EU | Albania, Republic of | AL | ALB | 8 | |
Antarctica | AN | Antarctica (the territory South of 60 deg S) | AQ | ATA | 10 | |
Africa | AF | Algeria, People's Democratic Republic of | DZ | DZA | 12 | |
Oceania | OC | American Samoa | AS | ASM | 16 | |
Europe | EU | Andorra, Principality of | AD | AND | 20 | |
Africa | AF | Angola, Republic of | AO | AGO | 24 | |
North America | NA | Antigua and Barbuda | AG | ATG | 28 | |
Europe | EU | Azerbaijan, Republic of | AZ | AZE | 31 |
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 | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
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\Traits; | |
trait HasLinks | |
{ | |
// $model->links = array | |
public function getLinksAttribute(): array | |
{ |
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
PUSHER_HOST=socket.yourdomain.com | |
PUSHER_APP_ID=unlock | |
PUSHER_APP_KEY=123 | |
PUSHER_APP_SECRET=456 | |
PUSHER_PORT=443 | |
PUSHER_SCHEME=https |