Skip to content

Instantly share code, notes, and snippets.

View rhernandog's full-sized avatar
🐯

Rodrigo Hernando rhernandog

🐯
View GitHub Profile
@rhernandog
rhernandog / pixi-sprite-generator.js
Last active September 21, 2016 04:03
Suggestion of a class that returns a PIXI Sprite object with a simple configuration.
/* CREATE PIXI SPRITE CLASS
* In order to clean the code create a class that returns the sprite
* for the background image.
* Most common cases for sprites are position, scale, width, height,
* anchor and alpha;
* @param {string} the image url
* @param {object} configurations of the sprite
*/
var createPixiSprite = function(imgURL, config){
@rhernandog
rhernandog / regiones-provincias-comunas.json
Last active November 4, 2024 13:43
Archivo en formato JSON con las regiones de Chile, sus provincias y las respectivas comunas de cada provincia.
[
{
"region": "Arica y Parinacota",
"region_number": "XV",
"region_iso_3166_2": "CL-AP",
"provincias": [
{
"name": "Arica",
"comunas": [
{
@rhernandog
rhernandog / regiones-comunas.json
Last active December 9, 2020 04:02
Archivo en formato JSON con las regiones y sus respectivas provincias y comunas.
[
{
"region": "Arica y Parinacota",
"region_number": "XV",
"region_iso_3166_2": "CL-AP",
"provincias": [
"Arica",
"Parinacota"
],
"comunas": [
@rhernandog
rhernandog / index.jsx
Last active December 17, 2020 14:53
React & Recompose withProps - A simple example of using recompose's withProps
// styles for this are based on Bootstrap 3.3.7
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { withProps } from "recompose";
const users = [
{ "name": "Homer Jay", "status": "pending" },
@rhernandog
rhernandog / color-names.js
Last active December 30, 2017 15:43
Javascript file with all the web-safe colors shown here https://www.w3schools.com/colors/colors_names.asp
const colors = [
{name: "AliceBlue", code:"#F0F8FF"},
{name: "AntiqueWhite", code:"#FAEBD7"},
{name: "Aqua", code:"#00FFFF"},
{name: "Aquamarine", code:"#7FFFD4"},
{name: "Azure", code:"#F0FFFF"},
{name: "Beige", code:"#F5F5DC"},
{name: "Bisque", code:"#FFE4C4"},
{name: "Black", code:"#000000"},
{name: "BlanchedAlmond", code:"#FFEBCD"},
{
"colorNames": [
{"name": "AliceBlue", "code":"#F0F8FF"},
{"name": "AntiqueWhite", "code":"#FAEBD7"},
{"name": "Aqua", "code":"#00FFFF"},
{"name": "Aquamarine", "code":"#7FFFD4"},
{"name": "Azure", "code":"#F0FFFF"},
{"name": "Beige", "code":"#F5F5DC"},
{"name": "Bisque", "code":"#FFE4C4"},
{"name": "Black", "code":"#000000"},
export const colorGroups = [
{name: "Pink", color: "#FFC0CB"},
{name: "LightPink", color: "#FFB6C1"},
{name: "HotPink", color: "#FF69B4"},
{name: "DeepPink", color: "#FF1493"},
{name: "PaleVioletRed", color: "#DB7093"},
{name: "MediumVioletRed", color: "#C71585"},
{name: "Lavender", color: "#E6E6FA"},
{name: "Thistle", color: "#D8BFD8"},
{
"colorGroups" : [
{
"groupName": "Pink",
"colors": [
{"name": "Pink", "color": "#FFC0CB"},
{"name": "LightPink", "color": "#FFB6C1"},
{"name": "HotPink", "color": "#FF69B4"},
{"name": "DeepPink", "color": "#FF1493"},
{"name": "PaleVioletRed", "color": "#DB7093"},
@rhernandog
rhernandog / colors-array.js
Created December 31, 2017 15:36
Array of web safe colors by HEX code
const colors = [
"#F0F8FF",
"#FAEBD7",
"#00FFFF",
"#7FFFD4",
"#F0FFFF",
"#F5F5DC",
"#FFE4C4",
"#000000",
"#FFEBCD",
const colorGroups = [
// PINK
"#FFC0CB",
"#FFB6C1",
"#FF69B4",
"#FF1493",
"#DB7093",
"#C71585",
// PURPLE
"#E6E6FA",