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
// Spread - Operator | |
const numbers = [1,1,2,3,5,8,13]; | |
const maxFromArray = Math.max(...numbers); // returns 13 | |
const num1 = [1,2,3]; | |
const num2 = [4,5,6]; | |
// this is also possible with objects | |
const fullnum = [...num1, ...num2]; // returns [1,2,3,4,5,6] |
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
// old way | |
const addNumber = function(num1, num2) { | |
return num1 + num2 | |
} | |
// this is same as.. | |
const multiply = (num1, num2) => { | |
return num1 * num2; | |
} | |
// this, and... |
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
{ | |
"scripts": { | |
"start": "ASPNETCORE_ENVIRONMENT=Development dotnet run", | |
"watch": "ASPNETCORE_ENVIRONMENT=Development dotnet watch" | |
} | |
} |
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 | |
if($this->hasPrevious == 1) { | |
$previousHref = $this->previous["href"]; | |
$GLOBALS['TL_HEAD'][] = '<meta name="robots" content="noindex,follow">'; | |
$GLOBALS['TL_HEAD'][] = '<link rel="prev" href="'.$previousHref.'">'; | |
} else { | |
$GLOBALS['TL_HEAD'][] = '<meta name="robots" content="index,follow">'; | |
} | |
if($this->hasNext == 1) { | |
$nextHref = $this->next["href"]; |
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
# Require any additional compass plugins here. | |
Encoding.default_external = 'utf-8' | |
project_type = :stand_alone | |
asset_cache_buster :none | |
sass_dir = "./scss/" | |
css_dir = "./files/" | |
# images_dir = "../img" | |
# fonts_dir = "../fonts" |
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
"use strict"; | |
(function($) { | |
/* | |
* Comment | |
*/ | |
function foo() { | |
// Do crazy shit here... | |
} |
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 if($condition) : ?> | |
<a href="http://yahoo.com">This will only display if $condition is true</a> | |
<?php elseif($anotherCondition) : ?> | |
more html | |
<?php else : ?> | |
even more html | |
<?php endif; ?> |
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
// iterate trought contaos tl_page palettes and added custom field between something you want | |
$GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] = str_replace | |
( | |
'description', | |
'custom_field_1, custom_field_2, description', | |
$GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] | |
); |