Skip to content

Instantly share code, notes, and snippets.

View Sensiblemnd's full-sized avatar

Rob Lloveras Sensiblemnd

View GitHub Profile
import React from "react";
type AccordionType = {
children: React.ReactNode[] | React.ReactNode;
};
const Accordion = (props: AccordionType) => {
return <div className="accordion">{props.children}</div>;
};
//Yay, namespacing!
@XciA
XciA / consecutive_numbers
Created April 13, 2014 06:52
group consecutive numbers in array , in Javascript.
/*
var data=[4,5,6,9,10,14,15,20,21,22,23,24,25,30,31,34]
output
4-6,9-10,14-15,20-25,30-31,34
*/
var data=[4,5,6,9,10,14,15,20,21,22,23,24,25,30,31,34,36,37,94,95];
var start=data[0];
var temp=1;
var a=0;
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||