Skip to content

Instantly share code, notes, and snippets.

View SpencerCarstens's full-sized avatar

Spencer Carstens SpencerCarstens

View GitHub Profile

Front End Engineering question Given an array, return it's flattend structure.

[1, [2, [3]]] -> [1, 2, 3]

[1, [2, 3], 4] -> [1, 2, 3, 4]

possible total 24 points

  • result [4]
@jenbennings
jenbennings / Widget - Spacegray.stTheme
Created February 23, 2015 21:44
Spacegray Ocean
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Gadzhi Kharkharov</string>
<key>comment</key>
<string>Spacegray</string>
<key>name</key>
<string>Spacegray</string>
[
//
// TABS (REGULAR)
//
// Tab set
{
"class": "tabset_control",
"layer0.texture": "",
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@joyrexus
joyrexus / README.md
Created March 28, 2014 16:59
Nested grouping of arrays

nest.js

A multi-level groupBy for arrays inspired by D3's nest operator.

Nesting allows elements in an array to be grouped into a hierarchical tree structure; think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. The levels in the tree are specified by key functions.

See this fiddle for live demo.

@bengl
bengl / LICENSE.txt
Created December 13, 2012 10:00 — forked from 140bytes/LICENSE.txt
Do A Barrel Roll!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@RichMorin
RichMorin / demo.css
Created March 19, 2012 16:20
Hive Plot Demo Rework
/* demo.css */
.axis {
stroke: #000;
stroke-width: 1.5px;
}
#demo_1 svg, #demo_2 svg { border: solid 1px #ccc; }
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];