Skip to content

Instantly share code, notes, and snippets.

🌱
💎

Sam Figueroa unimatrixZxero

🌱
💎
Block or report user

Report or block unimatrixZxero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@unimatrixZxero
unimatrixZxero / cf_chat.css
Created Nov 21, 2014
Make Propane's chat transcript a bit easier on the eyes
View cf_chat.css
body {
background-color:white ! important;
}
#upload_target {
display:none ! important;
}
div.bottom {
padding:0px ! important;
margin:0px ! important;
background-image: none ! important;
@unimatrixZxero
unimatrixZxero / append_watermark.sh
Created Feb 27, 2015
Script that uses imagemagick to append a watermark to the bottom of each image in the given folder.
View append_watermark.sh
#!/bin/sh
# _ __ _ _____
# __ ______ (_)___ ___ ____ _/ /______(_) _/__ / _ _____ _________
# / / / / __ \/ / __ \__ \/ __ \/ __/ ___/ / |/_/ / / | |/_/ _ \/ ___/ __ \
# / /_/ / / / / / / / / / / /_/ / /_/ / / /> < / /___> </ __/ / / /_/ /
# \__,_/_/ /_/_/_/ /_/ /_/\__,_/\__/_/ /_/_/|_| /____/_/|_|\___/_/ \____/
#
# 2012-11-02
# Script to use imagemagick to append a watermark to the bottom of a folder of images.
#
View schemata.php
<?php
/**
* SchemateBehavior - Somewhat ActivRecord'ish for CakePHP..
*
* @author Kjell Bublitz
* @link http://cakealot.com
* @license MIT
*/
class SchemataBehavior extends ModelBehavior {
View lighter.rb
# Lighter -- Campfire from the command line
# usage: ruby lighter.rb subdomain "Main Room" macournoyer@gmail
require "rubygems"
require "tinder"
require "readline"
require "highline/import"
class Lighter
def initialize(room)
@room = room
View gist:143713
attwenger = [
{ :year => 1991, :tracks => 18, :title => "Most" },
{ :year => 1992, :tracks => 10, :title => "Pflug" },
{ :year => 1993, :tracks => 17, :title => "Luft" },
{ :year => 1997, :tracks => 5, :title => "Song" },
{ :year => 2002, :tracks => 15, :title => "Sun" },
{ :year => 2005, :tracks => 14, :title => "dog" },
{ :year => 2006, :tracks => 17, :title => "dog2 remixes" },
{ :year => 2007, :tracks => 8, :title => "die Kia" }
]
@unimatrixZxero
unimatrixZxero / gist:150346
Created Jul 20, 2009 — forked from cypher/gist:150248
script to verify that only syntactically valid ruby code is commited #git
View gist:150346
#!/usr/bin/env ruby
#
# A hook script to verify that only syntactically valid ruby code is commited.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# Put this code into a file called "pre-commit" inside your .git/hooks
# directory, and make sure it is executable ("chmod +x .git/hooks/pre-commit")
#
View Interesting I18n repositories.textile
View gist:151330
# put this in your ~/.bash_profile (Mac OS X)
# Useful for Rails and Texmate coders
# Sometimes I find it's the little things that make life easier.
alias rr='rake routes'
alias ss='script/server'
alias ..='cd ..'
alias e='mate .'
alias lh3='open http://localhost:3000'
@unimatrixZxero
unimatrixZxero / watermark_dir.rb
Created Aug 15, 2009
Script to watermark and resize images with imageMagick
View watermark_dir.rb
#!/opt/local/bin/ruby
# _ __ _ _____
# __ ______ (_)___ ___ ____ _/ /______(_) _/__ / _ _____ _________
# / / / / __ \/ / __ \__ \/ __ \/ __/ ___/ / |/_/ / / | |/_/ _ \/ ___/ __ \
# / /_/ / / / / / / / / / / /_/ / /_/ / / /> < / /___> </ __/ / / /_/ /
# \__,_/_/ /_/_/_/ /_/ /_/\__,_/\__/_/ /_/_/|_| /____/_/|_|\___/_/ \____/
#
# Watermark folder script
# 2009-08-15 01:52 am
#
You can’t perform that action at this time.