[user] email = foo@mail.es name = "Foo Baz"
[alias] aa = add --all br = branch ca = commit --amend cm = commit -m co = checkout
To set code snippets on Visual Studio Code: | |
Go to to View / Command Palette | |
Write "snippets" and select "Snippets > Configure User Snippets". | |
Select PHP.json or the language that you want. | |
*** | |
My PHP snippets: | |
{ |
[user] email = foo@mail.es name = "Foo Baz"
[alias] aa = add --all br = branch ca = commit --amend cm = commit -m co = checkout
{ | |
"name": "ironwoods/some-name", | |
"type": "project", | |
"description": "Lorem ipsum...", | |
"license": "MIT", | |
"config": { | |
"optimize-autoloader": true, | |
"preferred-install": "dist", | |
"sort-packages": true | |
}, |
<?php | |
namespace App\Helpers; | |
use Closure; | |
use Image; | |
use Intervention\Image\Constraint; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
class FileHelper |
# With NPM | |
npm install --save-dev @babel/core@7.9.0 @lingui/cli@2.9.1 @lingui/macro@2.9.1 babel-core@7.0.0-bridge.0 | |
npm install --save @lingui/react@2.9.1 | |
# With Yarn | |
yarn add --dev @babel/core@7.9.0 @lingui/cli@2.9.1 @lingui/macro@2.9.1 babel-core@7.0.0-bridge.0 | |
yarn add @lingui/react@2.9.1 |
function getRandomSort(arr, number_of_elements) | |
{ | |
// Check and fix number_of_elements value | |
if (number_of_elements === undefined | |
|| number_of_elements > arr.length) { | |
number_of_elements = arr.length | |
} | |
let result = []; | |
while (result.length < number_of_elements) { |
// From: https://stackoverflow.com/a/1349426/3919660 | |
function getRamdomString(length) | |
{ | |
let result = ''; | |
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
const charactersLength = characters.length; | |
for (let i = 0; i < length; i++) { | |
result += characters.charAt(Math.floor(Math.random() * charactersLength)); |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |