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
1) Show lines when opening files. Add the -C flag | |
``` nano -C file.txt ``` | |
2) Go to line. | |
``` CTRL+SHIFT+_ ``` | |
3) Select block of text |
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
$countries = array('AF' => 'Afghanistan', 'AX' => 'Aland Islands', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua And Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia And Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' |
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\Billit\Traits; | |
trait Postmarkable | |
{ | |
/** | |
* @param array $tags | |
*/ | |
public function setTag(array $tag): void |
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
cd /usr/share/ | |
sudo mv phpmyadmin/ phpmyadmin-4.8.5/ | |
sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.zip | |
sudo unzip phpMyAdmin-4.8.5-all-languages.zip | |
sudo ln -s phpMyAdmin-4.8.5-all-languages phpmyadmin | |
sudo chown -R www-data:www-data /usr/share/phpmyadmin | |
sudo chmod -R 755 /usr/share/phpmyadmin | |
sudo service apache2 restart |
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
<template> | |
<cleave v-model="money" :options="options"></cleave> | |
</template> | |
<script> | |
import Cleave from 'vue-cleave-component'; | |
export default { | |
props:{ | |
value: { |
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\Traits; | |
use App\User; | |
use DateTime; | |
use GuzzleHttp\Psr7\Response; | |
use Illuminate\Events\Dispatcher; | |
use Laravel\Passport\Bridge\AccessToken; | |
use Laravel\Passport\Bridge\AccessTokenRepository; |
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
//////---------- in Controller @edit method | |
// set a variable with all needed initialized input (key value pairs) | |
$initInput = [] | |
$initInput = setInitInput($initInput); | |
// The setInitInput helper function, basically merges with old() input | |
function setInitInput(array $input){ | |
$oldInput = session()->getOldInput(); | |
unset($oldInput['_token']); |
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
<template> | |
<select :value="value" :name="name" class="form-control" v-on:input="updatevalue($event.target.value)" ref="input"> | |
<slot></slot> | |
</select> | |
</template> | |
<script> | |
export default { | |
props:['value','name'], | |
methods: { |
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
.select2 { | |
border-color:1px solid #cacaca; | |
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1); | |
background-color:#fefefe; | |
} | |
.select2-dropdown, .select2-container--default .select2-selection--single , | |
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--multiple .select2-selection__choice, | |
.select2-container--classic .select2-selection--multiple , .select2-container--classic .select2-selection--multiple, | |
.select2-container--classic .select2-selection--multiple .select2-selection__choice, .select2-dropdown, |
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
@if ($paginator->hasPages()) | |
<ul class="pagination" role="navigation" aria-label="Pagination"> | |
{{-- Previous Page Link --}} | |
@if ($paginator->onFirstPage()) | |
<li class="pagination-previous disabled"></li> | |
@else | |
<li class="pagination-previous"><a href="{{ $paginator->previousPageUrl() }}" aria-label="Previous page"></a></li> | |
@endif | |
{{-- Pagination Elements --}} |
NewerOlder