Alias | Command |
---|---|
g | git |
ga | git add |
gb | git branch |
gba | git branch -a |
gbd | git branch -d |
gc | git commit -v |
gc! | git commit -v --amend |
gcb | git checkout -b |
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 | |
function number_to_string($number): string | |
{ | |
$whole = floor($number); | |
$decimal = bcsub($number, $whole, 2); | |
$decimalPrefix = (-1 === bccomp($decimal, 0.1, 2)) ? 'zéro ' : ''; | |
$decimal = bcmul($decimal, 100, 2); |
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 | |
class TestCase extends \PHPUnit\Framework\TestCase | |
{ | |
public function testExample() | |
{ | |
$refClass = new \ReflectionClass(\App\MyClass::class); | |
$refMethod = $refClass->getMethod('somePrivateMethod'); | |
$refMethod->setAccessible(true); // make private method accessible |
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
import numeral from "numeral"; | |
import * as moment from "moment"; | |
import { datatableConfig } from "../config.json"; | |
$(document).ready(() => { | |
const $datatable = $('#-datatable'); | |
if (! $datatable) return; | |
numeral.localeData().delimiters.thousands = ' '; |
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\Rules; | |
/** | |
* Class ArrayNotEmpty | |
* | |
* @package App\Rules | |
* | |
* To register the rule, add in \App\Providers\AppServiceProvider |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.switch { | |
position: relative; | |
display: inline-block; | |
width: 50px; | |
height: 22px; |
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
{ | |
"port": 3000, | |
"files": [ | |
"./build/**/*.{html,htm,css,js}" | |
], | |
"server": { | |
"baseDir": "./" | |
}, | |
"delay": 3000, | |
"injectChanges": 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
select.form-control { | |
padding-right: 20px; | |
-webkit-appearance: none; | |
-moz-appearance: none; | |
appearance: none; | |
background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gMVEx0lHTdoJgAAAEBJREFUOMtjYBgFyICRHLXomv6TagATmoQ9EZrtCClIgroEG04k1o89WDR3kRqoW5A0byI3Zi4wMDCcG02gNAYA79cSVHAU23YAAAAASUVORK5CYII=') 99% center no-repeat; | |
} |
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 | |
/** | |
* Class ModelTest | |
* | |
* @package AppTest\Model | |
* | |
* @codingStandardsIgnoreFile | |
* @SuppressWarnings(PHPMD.CamelCaseMethodName) | |
* @SuppressWarnings(PHPMD.CamelCasePropertyName) |
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
.PHONY: up start stop down log artisan migrate scrap phone import composer supervisor-update fix-permissions ide-helper | |
# Set dir of Makefile to a variable to use later | |
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) | |
PWD := $(dir $(MAKEPATH)) | |
CONTAINER_FPM := "container_fpm" | |
CONTAINER_NGINX := "container_nginx" | |
CONTAINER_SUPERVISOR := "container_supervisor" | |
up: |
NewerOlder