Skip to content

Instantly share code, notes, and snippets.

View brunogarcia's full-sized avatar
📚
Always learning

Bruno brunogarcia

📚
Always learning
View GitHub Profile
@soerenmartius
soerenmartius / module.ts
Last active October 12, 2023 09:30
vuex 4 cognito module
import {
ActionContext,
ActionTree,
GetterTree,
MutationTree,
Module,
Store as VuexStore,
CommitOptions,
DispatchOptions,
} from 'vuex'
@krambertech
krambertech / Component.jsx
Created July 2, 2016 10:44
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();
@javivelasco
javivelasco / reactive-2016.md
Last active January 10, 2023 19:45
Proposal for lightning talk at Reactive Conf 2016

Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.

Styling Components in React Toolbox 2

I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.

Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f

@brunogarcia
brunogarcia / Dev-tools-for-Ubuntu.sh
Last active November 23, 2021 10:41
Linux Front-end Tools
###############
# GIT
###############
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
# Configuration
$ nano ~/.gitconfig
@reicolina
reicolina / flus-vs-redux-others.md
Last active April 25, 2016 03:08
Flux-Utils, Redux or Both?

A year ago, it was really hard to move away from writing Flux components in pure vanilla Javascript. The reason? there was a lot of Flux implementations (libraries) out there, but all of them were too young to be trusted in a production environment.

Within the last couple of months, Engineers at Facebook; the creators of Flux, have publicly endorsed one library: Redux, as well as their own Flux library, which includes new store classes that you can extend in order to implement your own ones without the boilerplate caused by Flux implementations written in vanilla Javascript.

So, which one to use? Well, it depends. Redux will require quite a refactor of your current flux application, specially if you already have several stores in place. This is because Redux advocates for having only one master store, instead of several ones. Also, The classic Flux dispatcher is now gone in Redux, and you will need to digest new concepts such as Reducers (for handling actions) and Middleware (for async API calls).

However,

@Couto
Couto / webpack.js
Last active November 11, 2020 17:53
Fetch polyfill with webpack
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
@vibragiel
vibragiel / papeles_barcenas.json
Last active December 12, 2015 02:48
JSON con los papeles de Bárcenas publicados por EL PAÍS en http://elpais.com/especiales/2013/caso_barcenas/todos_los_papeles.html
[
{
"forma": "Efectivo",
"debe_unidad": "(\u00bf?)",
"debe": 8.0,
"concepto": "Saldo inicial (entrega R. N.)",
"haber": null,
"anyo": 1990,
"saldo": 8.0,
"saldo_unidad": "(\u00bf?)",
@apoo
apoo / gist:2279196
Created April 1, 2012 22:40
Managing multiple SSH Keys for different GitHub Accounts
Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH
Create a config file in ~/.ssh/
vim config:
# PERSONAL ACCOUNT Github
Host github.com-COOL
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_COOL
@max-mapper
max-mapper / install-couchdb-ubuntu.txt
Created July 6, 2011 21:39
How to install CouchDB on Ubuntu/Debian
least amount of time (binary distribution that includes geocouch):
- visit http://www.couchbase.com/downloads/couchbase-single-server/community
- download the correct .deb for your platform (32 or 64 bit)
- make it executable: chmod +X couchbase.deb
- install: dpkg -i couchbase.deb
medium amount of time: from apt-get (has a history of weird bugs and poor package maintenance)
- apt-get install couchdb
most time consuming: from source (if you have a unix beard or whatever)
@TheBrousse
TheBrousse / image_list.js
Created May 4, 2011 16:27
Titanium Image List View
var win = Ti.UI.currentWindow;
// Images to display (this list can be dynamically generated)
var images = [ 'image1.png', 'image2.png', 'image3.png', 'image4.png',
'image5.png',' image6.png', 'image7.png', 'image8.png' ];
// Empty table data (will be populated at runtime)
var data = [];
var table = Ti.UI.createTableView();