Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Building Particle System

Rodrigo area73

🎯
Building Particle System
View GitHub Profile
@area73
area73 / dabblet.css
Created December 17, 2020 06:24
Multiple borders
View dabblet.css
/**
* Multiple borders
*/
div {
width: 100px;
height: 60px;
margin: 25px;
clip:150px;
background: yellowgreen;
@area73
area73 / iterm2.md
Created October 10, 2020 17:51 — forked from fnzv/iterm2.md
iterm2 shortcut cheat sheet
View iterm2.md

Note: You may have to go into Preferences (⌘,) -> Profiles -> Keys and enable Left option (⌥) key acts as: +Esc for the option commands to work.

Modifier Symbol
Option
Command
Control
Caps Lock
Shift
@area73
area73 / pre-push
Last active October 9, 2020 05:33
Prevent git push to master git prehook
View pre-push
#!/bin/bash
# Prevents force-pushing to master.
# Based on: https://gist.github.com/stefansundin/d465f1e331fc5c632088
# Global installation instructions
# mkdir $HOME/.githooks
# git config --global core.hooksPath $HOME/.githooks
# curl -fL -o $HOME/.githooks/pre-push https://gist.githubusercontent.com/area73/9783f2616c82dc451fd070661d3008d2/raw/ac5feeed9f4766195e2ec6cd6d85d3a3863cc128/pre-push
# chmod +x $HOME/.githooks/pre-push
# Uninstall:
# rm $HOME/.githooks/pre-push
@area73
area73 / singletonReinforcer.js
Created July 12, 2019 05:05
#singleton, #singleton reinfircer
View singletonReinforcer.js
const _singletonEnforncer = Symbol('private');
let _instance;
export default class EventHandler extends EventTarget {
static getInstance() {
return _instance || new EventHandler(_singletonEnforncer);
}
static throwSingletonError() {
throw new Error(`
@area73
area73 / privateMethods.js
Created March 26, 2019 22:46
Private methods in ES6
View privateMethods.js
// USING SYMBOL
'use strict'
const _resetTable = Symbol('resetTable');
const _replaceTable = Symbol('replaceTable');
;
class Rejs {
@area73
area73 / README.md
Created January 20, 2019 10:19
REAME.md Template
View README.md

PROJECT NAME AND DESCRIPTION

Short introduction or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.) You can also add some badges/states next to Project Name, e.g, Like:

Build Status

Index

@area73
area73 / README.md
Created January 2, 2019 15:26 — forked from rrag/README.md
Yet another tutorial and Cheat sheet to Functional programming
View README.md

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.

@area73
area73 / flattenArray.js
Last active November 12, 2018 03:01
Array flatten
View flattenArray.js
// flatten Array of any deep
const flattenArray = arr => {
return arr.reduce((prev,next)=> (
Array.isArray(next)
? prev.concat(flattenArray(next))
: prev.concat(next)
),[]);
};
module.exports = flattenArray;
@area73
area73 / gist:f6062ff205a9d881fd4c236a4cf9c948
Created October 4, 2018 21:01 — forked from dcneiner/gist:1137601
List of Inherited CSS
View gist:f6062ff205a9d881fd4c236a4cf9c948
Consolidated lists of CSS properties that are inherited by default.
Taken from http://www.w3.org/TR/CSS21/propidx.html
--------------------------------------------------------------------
One item not in the list was "text-decoration" which affects child elements. A few new properties (text-shadow) also affect child elements
List
azimuth
border-collapse
@area73
area73 / Operaciones-Git
Created July 12, 2018 13:10 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
View Operaciones-Git
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas