Skip to content

Instantly share code, notes, and snippets.

View ricardocanelas's full-sized avatar
🦈

Ricardo Canelas ricardocanelas

🦈
View GitHub Profile
@ricardocanelas
ricardocanelas / polish.md
Created February 18, 2017 18:51
Polish for Brazilian People

Good morning Dzien dobry / Jindobre /

Good night Dobranoc / DoBRAnos /

Hi

@ricardocanelas
ricardocanelas / VagrantFile
Last active September 17, 2020 05:45
Vagrant / PHP7.1 + MySQL5.6 + Apache
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.100.100"
config.vm.synced_folder "./www", "/var/www/", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
@ricardocanelas
ricardocanelas / js-copying-arrays-objects.js
Created January 2, 2017 12:03
Javascript / Copying Arrays and Objects
// Array
const players = ['Ricardo', 'Canelas', 'Robyn', 'Emma'];
const team = players.slice();
const team2 = [].concat(players);
const team3 = [...players]; // ...spread
// Object - *note: this is only 1 level deep
const person = {name: 'Ricardo Canelas', age: 23};
const capitan = Object.assign({}, person, { from: 'Brazil' });
@ricardocanelas
ricardocanelas / js-console.js
Created January 1, 2017 17:29
Javascript / Console Tool
console.log('Hello');
console.log('Hello I am %s', 'Ricardo');
console.log('%c I am a great sentence', 'font-size:14px; background-color:red');
console.warn('OH NOOO');
console.error('OH shit!');
@ricardocanelas
ricardocanelas / js-array.js
Last active January 1, 2017 13:23
Javascript / Array
const inventors = [
{ first: 'Albert', last: 'Einstein', year: 1879, passed: 1955 },
{ first: 'Isaac', last: 'Newton', year: 1643, passed: 1727 },
{ first: 'Galileo', last: 'Galilei', year: 1564, passed: 1642 },
{ first: 'Marie', last: 'Curie', year: 1867, passed: 1934 },
{ first: 'Johannes', last: 'Kepler', year: 1571, passed: 1630 },
{ first: 'Nicolaus', last: 'Copernicus', year: 1473, passed: 1543 },
{ first: 'Max', last: 'Planck', year: 1858, passed: 1947 },
{ first: 'Katherine', last: 'Blodgett', year: 1898, passed: 1979 },
{ first: 'Ada', last: 'Lovelace', year: 1815, passed: 1852 },