Skip to content

Instantly share code, notes, and snippets.

View dorellango's full-sized avatar
🏠
Working from home

Diego Orellana G. dorellango

🏠
Working from home
View GitHub Profile
version: 0.2
#env:
#variables:
# key: "value"
# key: "value"
#parameter-store:
# key: "value"
# key: "value"
#git-credential-helper: yes
-='cd -'
...=../..
....=../../..
.....=../../../..
......=../../../../..
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
@dorellango
dorellango / .php_cs
Created September 12, 2019 13:56
PSR2 PHP fixer
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
@dorellango
dorellango / regexCheatsheet.js
Created August 1, 2019 16:27 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@dorellango
dorellango / script.js
Created August 1, 2019 16:12
String Methods
/* 20 String Methods */
var stringOne = "freeCodeCamp is the best place to learn"
var stringTwo = "frontend and backend development"
// charAt()
console.log(stringOne.charAt(1))
// charCodeAt()
console.log(stringOne.charCodeAt(1))