View boolean-helper.php
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 | |
if ( ! function_exists( 'bool' ) ) { | |
function bool( $value, $default = false ): bool { | |
return filter_var( $value ?? $default, FILTER_VALIDATE_BOOLEAN ); | |
} | |
} |
View app.sass
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
body | |
&:before | |
z-index: 9999999999999 | |
position: fixed | |
width: 100% | |
font-size: 10px | |
left: 0 | |
top: 0 | |
padding: 0 4px | |
line-height: 9px |
View trans.js
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
const languages = [ | |
"en", "da", | |
]; | |
const files = [ | |
"products", "dates", "validation", | |
]; | |
let output = {}; |
View switch-example.php
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 | |
switch($x) { | |
case 138: | |
$activeCell = "Efterårssemesteret 2018"; | |
break; | |
case 137: | |
$activeCell = "Forårssemesteret 2018"; | |
break; |
View MigrationsCanOnlyMoveUpException.php
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 | |
namespace App\Exceptions; | |
class MigrationsCanOnlyMoveUpException extends \Exception | |
{ | |
protected $message = 'Never gonna let you down.'; | |
} |
View reverse-tax.php
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
$taxPercentage = 25; | |
echo ( 100 / ( 1 + ( $taxPercentage / 100 ) ) ) / 100; // 0.8 |
View create-invoice.php
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 | |
// Create Instance | |
$dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret ); // Client ID + Secret gotten from Dinero | |
// Auth to a Dinero account | |
$dinero->auth( $apiKey, $orgId ); // API key created in Dinero + company ID (bottom left when logged in) | |
// Create the invoice | |
$invoice = $dinero->invoices()->create([ |
View fix.css
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
::-webkit-input-placeholder { | |
color: #999; | |
} | |
::-moz-placeholder { | |
color: #999; | |
} | |
:-ms-input-placeholder { | |
color: #999; | |
} | |
:-moz-placeholder { |
View example.php
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 | |
namespace App\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class ProductStoreRequest extends FormRequest | |
{ | |
public function rules() | |
{ | |
return [ |
View demo2.json
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
{..data..} |
NewerOlder