Skip to content

Instantly share code, notes, and snippets.

View maxgiraldo's full-sized avatar

Max Giraldo maxgiraldo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am maxgiraldo on github.
  • I am mxg (https://keybase.io/mxg) on keybase.
  • I have a public key whose fingerprint is 31E1 B1C4 8CAD 4338 F32F F98C 97C9 1BD9 9D69 72F7

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am maxgiraldo on github.
  • I am mxg (https://keybase.io/mxg) on keybase.
  • I have a public key whose fingerprint is A7AC 181F A66E C7E1 C6E1 2FCE 3369 6BEA BEC8 44D1

To claim this, I am signing this object:

/**
* Use CSS to edit individual shapes by ID
*/
Savage.prototype.edit = function(shapeId) {
var root = this;
var $shape = root._getShapeByLayerId(this.svgParent, shapeId);
console.log('$shape', $shape)
return {
fill: function(color) {
if (color.indexOf('#') === -1) color = '#' + color;
@maxgiraldo
maxgiraldo / flatten_array.rb
Last active May 20, 2016 17:35
Flattens an array
def flatten_array(arr, flat_array)
arr.each do |el|
if el.kind_of? Array
flatten_array(el, flat_array)
else
flat_array.push el
end
end
flat_array
@maxgiraldo
maxgiraldo / countries.swift
Created January 31, 2016 21:02
All country codes including full name
let countries = [
"AF - Afghanistan",
"AX - Aland Islands",
"AL - Albania",
"DZ - Algeria",
"AS - American Samoa",
"AD - Andorra",
"AO - Angola",
"AI - Anguilla",
"AQ - Antarctica",