Skip to content

Instantly share code, notes, and snippets.

View juanpablocs's full-sized avatar
💭
👨‍💻 Coding..

Juan pablo juanpablocs

💭
👨‍💻 Coding..
View GitHub Profile
@sergiodxa
sergiodxa / 1-redux-example.js
Last active May 8, 2017 16:22
Ejemplo de Redux y React
import {
createStore,
applyMiddleware,
} from 'redux';
import {
Provider,
connect,
} from 'react-redux';
import React, { Component } from 'react';
import { render } from 'react-dom';
@alashow
alashow / PrettyIntegers.java
Last active October 1, 2016 02:57
Convert long integers to "pretty" strings. Could be used for ids in pretty urls
package tm.alashow.playground;
public class PrettyIntegers {
public static void main( String args[] ) {
Character[] map = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K',
'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't',
'u', 'v', 'x', 'y', 'z', '1', '2', '3'};
@frontend-3
frontend-3 / gist:360d9f15657139adba00
Created July 6, 2015 16:26
Bash para git pull y push en branch actual
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
function gpull() {
git pull origin $(current_branch)
}
function gpush() {
@protrolium
protrolium / ffmpeg.md
Last active September 9, 2025 22:54
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@chantastic
chantastic / on-jsx.markdown
Last active May 13, 2025 12:04
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@anareyna
anareyna / english-links.md
Last active October 23, 2023 10:55
English
@staltz
staltz / introrx.md
Last active September 25, 2025 07:30
The introduction to Reactive Programming you've been missing
@yanatan16
yanatan16 / load-balancer.conf
Created April 11, 2014 22:54
Example nginx load balancer
## Global parameters
## StatsD Plugin: https://github.com/zebrafishlabs/nginx-statsd
statsd_server statsd.domain.tld;
# Stop proxying to an upstream if any of these happen
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
# Setup standard forwarding headers
proxy_set_header Accept-Encoding "";
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 6, 2025 10:00
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')