Skip to content

Instantly share code, notes, and snippets.

View sveggiani's full-sized avatar
🚀
brand new day

Sebastián Veggiani sveggiani

🚀
brand new day
View GitHub Profile
@sveggiani
sveggiani / gulpfile.js
Last active August 29, 2015 14:04
Playing with gulp.js #javascript #gulp
/**
* Gulp tutorial
* Based on: http://markgoodyear.com/2014/01/getting-started-with-gulp/
*/
// Requires gulp and gulp plugins
var gulp = require('gulp'),
less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
@sveggiani
sveggiani / SimpleClass.php
Last active August 29, 2015 14:04
Simple class creation and properties asignation #php #class #oop
<?php
class SimpleClass {
public param1;
public param2;
public loggedUser = false;
// constructor, se ejectua al crear una instancia:
// $instancia = new SimpleClass('valueForParam1', 'valueForParam2', $userIdDeOtroLado);
function __construct($param1, $param2, $userId = false) {
@sveggiani
sveggiani / long_line_breaking.php
Last active August 29, 2015 14:10
Long lines breaking #php
<?php
// Manejable...
$flavors1 = array('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee', 'mocha chip');
if ($condition == 1) {
$flavors1 = array('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
@sveggiani
sveggiani / gist:e023eb6e14ccd9ae2350
Created March 6, 2015 12:35 — forked from lttlrck/gist:9628955
git rename local and remote branch #git #branch
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@sveggiani
sveggiani / file.sh
Last active September 7, 2016 03:10
list all files in a commit #git #code-fragments
git diff-tree --no-commit-id --name-only -r [commit hash]
#or
git show --pretty="format:" --name-only [commit hash]
@sveggiani
sveggiani / Default (OSX).sublime-keymap
Created April 14, 2016 03:22
My Sublime Text 3 keyboard shortcut customizations for spanish keyboards
[
/* Default fixes and customizations
-----------------------------------------------------------------------------
use "sublime.log_input(True)" in console to inspect key codes
use "sublime.log_commands(True)" in console to inspect triggered commands
*/
// Alternative to open ST console
{ "keys": ["f8"], "command": "show_panel", "args": {"panel": "console"} },
// Fixes for spanish keyboards
@sveggiani
sveggiani / Drupal - RESTful Webservices API.md
Last active September 5, 2017 14:40
Drupal - RESTful Webservices API #drupal #restful #webservices #cms

Drupal RESTful Webservices API

Características

Implementación

@sveggiani
sveggiani / webpack.config.dev.js
Last active September 5, 2017 14:34 — forked from matyax/webpack.config.dev.js
Webpack development config file #code-fragments #webpack #building
var path = require('path'),
webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
OpenBrowserPlugin = require('open-browser-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
precss = require('precss'),
autoprefixer = require('autoprefixer'),
DashboardPlugin = require('webpack-dashboard/plugin');
mockMode = false;
@sveggiani
sveggiani / javascript_study_notes.md
Last active December 10, 2021 15:58
[Javascript - Study notes] #study-notes #javascript

Javascript - Study notes

1. Concepts

1.1. Event Delegation

An event listener is added to a parent element instead of on its descendants. As child events bubbles up DOM the event is triggered. This allows less memory usage and having to handle events after removing or adding descendants.

1.1.1. Event Bubbling