Skip to content

Instantly share code, notes, and snippets.

@marcel
marcel / gist:2100703
Created March 19, 2012 07:24
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
require "rubygems"
require "rbench"
require "set"
RANGE = (1..1000)
ARRAY = RANGE.to_a
SET = Set.new(ARRAY)
WORST_CASE_COMPLEXITY = ARRAY.size + 1
@marcel
marcel / extractor.scala
Last active August 29, 2015 14:26
unapply tuple extraction
import scala.util.matching.Regex
import scala.util.matching.Regex.Match
trait RegexExtractor[M] {
def pattner: Regex
def unapply(line: String): Option[M] = {
pattern.findFirstMatchIn(line) map { matches =>
extractMatches(matches)
}
@marcel
marcel / puun-alla-lyrics.txt
Last active December 20, 2015 09:12
Puun Alla lyrics
Puun alla katselen, (under the tree I watch)
lentäviä tähtiä (the flying stars [shooting stars])
Puun alla uneksin (under the tree i dream of)
Rakkaudesta ikuisesta (love everlasting)
[chorus]
jos voisin kiivetä (if I could climb)
korkealle (way up high)
voisin nähdä kaiken (I could see it all)
# v1beta1.Deployment: Deployment enables declarative updates for Pods and ReplicaSets.
# (apiVersion <string>): APIVersion defines the versioned schema of this
# representation of an object. Servers should convert recognized schemas to the
# latest internal value, and may reject unrecognized values. More info:
# http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
apiVersion:
# (kind <string>): Kind is a string value representing the REST resource this
# object represents. Servers may infer this from the endpoint the client submits
# requests to. Cannot be updated. In CamelCase. More info:
@marcel
marcel / keybase.md
Created October 12, 2017 21:40
keybase.md

Keybase proof

I hereby claim:

  • I am marcel on github.
  • I am marcelmolina (https://keybase.io/marcelmolina) on keybase.
  • I have a public key ASAuJPmRumV3sIFsF6idkKy9B6sUI34TkSaG3HIpdB3tzwo

To claim this, I am signing this object: