Skip to content

Instantly share code, notes, and snippets.

View lagartoflojo's full-sized avatar
🇨🇱
en 🇩🇪

Hernán Schmidt lagartoflojo

🇨🇱
en 🇩🇪
  • Nürnberg, Deutschland
View GitHub Profile
@lagartoflojo
lagartoflojo / nesting.coffee
Created February 13, 2012 23:12 — forked from geddski/nesting.js
Helper function for nesting Backbone collections (CoffeeScript version)
Backbone.Model::nestCollection = (attributeName, nestedCollection) ->
#setup nested references
for item, i in nestedCollection
@attributes[attributeName][i] = nestedCollection.at(i).attributes
#create empty arrays if none
nestedCollection.bind 'add', (initiative) =>
if !@get(attributeName)
@attributes[attributeName] = []
@get(attributeName).push(initiative.attributes)
@lagartoflojo
lagartoflojo / scroll-shadow.css
Created October 11, 2017 13:02 — forked from travismillerweb/scroll-shadow.css
CSS - Google Scroll Shadow
/*
Gmail/Google Reader Sidebar Scroll Shadows
-------------------------------------------
Neat effect that mimics the scroll shadows that appear in the GOogle sitde bar and visually cues users to scroll up or down depending on their position.
Credit goes to Lea Verou for this awesome find.
Source:
Lea's Talk: http://www.youtube.com/watch?v=3ikye7Qc7Ak
Code Source: http://lea.verou.me/more-css-secrets/#slide9
@lagartoflojo
lagartoflojo / copy-k8s-resources-across-namespaces.sh
Last active October 30, 2017 16:48 — forked from simonswine/copy-k8s-resources-across-namespaces.sh
Copying kubernetes resources accross namespaces
kubectl get rs,secrets -o json --namespace <OLD_NAMESPACE> | jq '.items[].metadata.namespace = "<NEW_NAMESPACE>"' | kubectl create -f -