Skip to content

Instantly share code, notes, and snippets.

View reu's full-sized avatar

Rodrigo Navarro reu

View GitHub Profile
@sergiolopes
sergiolopes / README.md
Last active February 11, 2024 23:57
A script to generate SVG sprites, including CSS and PNG fallbacks.
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@nilcolor
nilcolor / 0_README.md
Last active December 11, 2015 12:48
ruby-1.9.3-p374 cumulative performance patch for rbenv

ruby-1.9.3-p374 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p374 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@jstroem
jstroem / Test.hs
Last active January 21, 2016 17:44
CSE230 HW1
module Main where
import qualified Hw1 as H
import Text.Printf
main :: IO ()
main = do
putStrLn(printf "rectangle sides: %d" (H.sides (H.rectangle 2 3)))
putStrLn(printf "rtTriangle sides: %d" (H.sides (H.rtTriangle 2 3)))
putStrLn(printf "Polygon sides with 0 vertexes: %d" (H.sides (H.Polygon [])))
@karmi
karmi / movie-titles.rb
Created January 13, 2013 20:42
Multiple analyzers and query fields in Elasticsearch for auto-completion
require 'tire'
# Tire.configure { logger STDERR, level: 'debug' }
Tire.index('movie-titles') do
delete
create \
settings: {
index: {
analysis: {
@jboner
jboner / SimpleAkkaIoHttpClient.scala
Created January 4, 2013 10:17
Nice simple Akka IO HTTP Client by @patriknw
import akka.actor._
import java.net.InetSocketAddress
import akka.util.ByteString
class SimpleClient(destAddress: InetSocketAddress) extends Actor {
val socket = IOManager(context.system) connect (destAddress)
val state = IO.IterateeRef.sync()
@searler
searler / HTTP.scala
Created November 10, 2012 17:21
Source code for Akka IO http server example
/**
* © 2012 Typesafe Inc.
*
* Extracted from http://doc.akka.io/docs/akka/2.1.0-RC2/scala/io.html
*/
import akka.actor._
import akka.util.{ ByteString, ByteStringBuilder }
import java.net.InetSocketAddress
@floere
floere / picky_basic_script.rb
Created November 9, 2012 11:02
Picky basic script example
require 'picky'
Person = Struct.new :id, :age, :name
data = Picky::Index.new :people do
category :age, partial: Picky::Partial::None.new
category :name
end
data.replace Person.new(1, 34, 'Florian')
@hyone
hyone / gist:3950460
Created October 25, 2012 04:49
Multiple async HTTP requests by Haskell
{-# LANGUAGE FlexibleContexts #-}
import Data.Conduit
import qualified Data.Conduit.List as CL
import Network.HTTP.Conduit
import Control.Concurrent.Async (mapConcurrently)
import Control.Concurrent.MVar
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Control (MonadBaseControl)