Skip to content

Instantly share code, notes, and snippets.

View jggutierrez's full-sized avatar

James Gutierrez jggutierrez

  • Chelsea Rhone, LLC
  • Ann Arbor, MI
View GitHub Profile
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@staxmanade
staxmanade / StaticCLassItemMetadata.cs
Created January 13, 2012 06:39
Sort of like an Enum with more data or behavior possibilities.
public class Sample
{
[Test]
public void MetadataSample()
{
Items.ItemA.ShouldEqual(Items.ItemA);
Items.ItemA.Description.ShouldEndWith("Description for A");
}
}