Skip to content

Instantly share code, notes, and snippets.

🏠
(在家工作) Working from home

Lasse Rafn LasseRafn

🏠
(在家工作) Working from home
Block or report user

Report or block LasseRafn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View trans.js
const languages = [
"en", "da",
];
const files = [
"products", "dates", "validation",
];
let output = {};
View switch-example.php
<?php
switch($x) {
case 138:
$activeCell = "Efterårssemesteret 2018";
break;
case 137:
$activeCell = "Forårssemesteret 2018";
break;
View MigrationsCanOnlyMoveUpException.php
<?php
namespace App\Exceptions;
class MigrationsCanOnlyMoveUpException extends \Exception
{
protected $message = 'Never gonna let you down.';
}
View reverse-tax.php
$taxPercentage = 25;
echo ( 100 / ( 1 + ( $taxPercentage / 100 ) ) ) / 100; // 0.8
View create-invoice.php
<?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
::-webkit-input-placeholder {
color: #999;
}
::-moz-placeholder {
color: #999;
}
:-ms-input-placeholder {
color: #999;
}
:-moz-placeholder {
View example.php
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ProductStoreRequest extends FormRequest
{
public function rules()
{
return [
View laravel-nav-item.php
<?php
namespace App\Nav;
class NavItem {
public static function render($routeName, $text = '') {
return '<li' . ($routeName === \Route::currentRouteName() ? 'class="active"' : '') . '><a href="' . route($routeName) . '">' . $text . '</a></li>';
}
}
You can’t perform that action at this time.