Skip to content

Instantly share code, notes, and snippets.

Avatar

Bruno brunogarcia

View GitHub Profile
@brunogarcia
brunogarcia / es5-subclasses.js
Last active Apr 30, 2018
ES6/ES5 subclasses
View es5-subclasses.js
// ### Psuedoclassical Subclassing ###
// This combines the name defined by `class` with the code defined in `constructor`:
function Tree(size, leaves) {
this.size = (typeof size === "undefined")? 10 : size;
const defaultLeaves = {spring: 'green', summer: 'green', fall: 'orange', winter: null};
this.leaves = (typeof leaves === "undefined")? defaultLeaves : leaves;
this.leafColor = null;
}
// The "instance" method:
View Install JDK on Ubuntu
- sudo apt-get update
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
- sudo update-alternatives --config java
- java -version
@brunogarcia
brunogarcia / codelite.md
Last active Oct 9, 2017
Codelite Configuration
View codelite.md

Bin

  • Create bin folder
  • Go to Settings/General and update:
    • Output file: /bin/$(ProjectName)
    • Working directory: /bin
  • Test it!

Source

  • Delete main.c
  • Create source folder
@brunogarcia
brunogarcia / myComponent.scss
Created Aug 12, 2016
CSS Modules + composes
View myComponent.scss
// myComponent.scss
.myStyle {
composes: some-helper from '_helpers.scss';
}
// _helpers.scss
.some-helper {
color: red
}
@brunogarcia
brunogarcia / Dev-tools-for-Ubuntu.sh
Last active May 14, 2018
Linux Front-end Tools
View Dev-tools-for-Ubuntu.sh
###############
# GIT
###############
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
# Configuration
$ nano ~/.gitconfig
View grunt-bowercopy.js
/*
Bower copy
Scrupulously manage file locations for bower dependencies.
https://www.npmjs.com/package/grunt-bowercopy
*/
'bowercopy': {
libs: {
options: {
destPrefix: '<%= config.dev %>/assets/js/vendors'
},
View grunt-ftpdeploy.js
/*
FTP Deploy
Grunt task for code deployment over ftp
https://github.com/zonak/grunt-ftp-deploy
*/
'ftp-deploy': {
build: {
auth: {
host: 'ftp.TU_DOMINIO.com',
port: 21,
View grunt-cachebreaker.js
/*
Cache breaker
Simple cache-breaker, appends a timestamp or md5 hash to any urls
https://www.npmjs.com/package/grunt-cache-breaker
*/
'cachebreaker': {
dev: {
options: {
match: ['main.min.js', 'main.css'],
},
View grunt-sass-dist.js
/*
Sass
Compile Sass to CSS
https://www.npmjs.com/package/grunt-contrib-sass
*/
'sass': {
dist: {
options: {
style: 'compressed'
},
View grunt-htmlmin.js
/*
HTML Min
Minify HTML
https://github.com/gruntjs/grunt-contrib-htmlmin
*/
'htmlmin': {
dist: {
options: {
removeComments: true,
collapseWhitespace: true
You can’t perform that action at this time.