Skip to content

Instantly share code, notes, and snippets.

View guilleiguaran's full-sized avatar
💭

Guillermo Iguaran guilleiguaran

💭
View GitHub Profile
@guilleiguaran
guilleiguaran / percona-toolkit.rb
Created October 19, 2017 17:45
Homebrew Formula for Percona Toolkit 2.2.19
class PerconaToolkit < Formula
desc "Percona Toolkit for MySQL"
homepage "https://www.percona.com/software/percona-toolkit/"
url "https://www.percona.com/downloads/percona-toolkit/2.2.19/tarball/percona-toolkit-2.2.19.tar.gz"
mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/percona-toolkit-2.2.19.tar.gz"
mirror "https://dl.bintray.com/homebrew/mirror/percona-toolkit-2.2.19.tar.gz"
sha256 "e9f4d4730265813fa7a39ed8799d12ca5775c8e5d6fa27ff48bae11db0f7e671"
revision 1
head "lp:percona-toolkit", :using => :bzr
@guilleiguaran
guilleiguaran / application-9f8b759dfbefae75069a6cefd9d13932.css
Created January 22, 2014 16:55
Sprockets preprocessor for asset paths
body{background-image:url("/assets/background-0539f790ccc171714d5ad38f5524423e.jpg")}
@guilleiguaran
guilleiguaran / application_helper.rb
Created August 15, 2011 20:44
CoffeeScript inside your views templates
# coffee_script_tag
# Usage:
#
# <%= coffee_script_tag do %>
# alert 'Hello World'
# <% end %>
#
#
# You will get in your page:
#
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
import Kitura
import KituraNet
import KituraSys
let router = Router()
router.get("/") {
request, response, next in
response.send("Hello, World!")
next()
defmodule MyMod do
defmodule Base do
def __using__(_) do
end
end
@mod Application.get_env(:my_app, :mod, MyMod.Base)
use @mod
end
defmodule Parallel do
def pmap(collection, fun) do
me = self
collection
|> Enum.map(fn (elem) ->
spawn_link fn -> send(me, { self, fun.(elem) }) end
end)
|> Enum.map(fn (pid) ->
receive do { ^pid, result } -> result end
end)
module Rogue
class Request
attr_reader :parser, :env, :body
PROTOTYPE_ENV = {
"SERVER_SOFTWARE" => "Rogue #{::Rogue::VERSION}".freeze,
"SCRIPT_NAME" => "",
"GATEWAY_INTERFACE" => "CGI/1.2",
"rack.url_scheme" => "http",
"rack.errors" => STDERR,
module hello_app;
import std.stdio;
import heaploop.looping;
import heaploop.networking.http;
import rack.app;
import rack.adapter;
class HelloApp : RackApp {
RackResponse call(string[string] env) {
require 'action_controller'
require 'action_controller/log_subscriber'
module ActionController
class Bare < Metal
abstract!
module Compabitility
def cache_store; end
def cache_store=(*); end