Skip to content

Instantly share code, notes, and snippets.

View kikofernandez's full-sized avatar

Kiko Fernandez-Reyes kikofernandez

View GitHub Profile
@rcook
rcook / AWSService.hs
Last active May 23, 2022 09:14
AWS via Haskell Part 5 (Lambda)
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module AWSViaHaskell.AWSService
@kgrz
kgrz / workaround.md
Created June 20, 2016 05:12
Possible workaround for installing nokogiri 1.6.8 on OSX with brewed libxml2 2.9.4

Problem:

The following commands fail on OSX:

gem install nokogiri
gem install nokogiri -- --use-system-libraries
gem install nokogiri -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-xml2-dir=/usr/local/opt/libxml2

Version:

@jayfredlund
jayfredlund / 2.0.0p451.txt
Created April 22, 2014 18:06
Install paths for rbenv, ubuntu 14.04 LTS, and ruby 2.0.0 p451 and ruby 2.1.1
curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 2.0.0-p451
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@kikofernandez
kikofernandez / handler.clj
Created April 5, 2013 17:45
Small example of using sessions in Compojure using sandbar. The function is called stateful-route and is in the file handler.clj .In private.clj you can find an example of using and initializing a session using sandbar in Compojure.
(ns project-name.handler
(:require [compojure.handler :as handler]
[compojure.route :as route]
[ring.middleware.params :as params]
[sandbar.stateful-session :as session]
[project-name.controllers.private :as private]))
(defn- stateful-route
"Calls the routeFn adding stateful session."
[routeFn]
@jeroenvandijk
jeroenvandijk / Readm.md
Last active August 31, 2017 09:13
Instructions to test Logstash with Kafka

Test Logstash with Kafka

Setup Kafka

Download Kafka from:

https://www.apache.org/dyn/closer.cgi/incubator/kafka/kafka-0.7.2-incubating/kafka-0.7.2-incubating-src.tgz

Install Kafka

@abhishek77in
abhishek77in / report.rb
Created December 9, 2012 19:31
Create a PDF Document using Prawn Library with header, footer and page numbering.
require "prawn"
Prawn::Document.generate("report.pdf") do
10.times do
start_new_page
end
repeat :all do
move_down 50
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@dhavaln
dhavaln / filesystem.js
Created June 8, 2012 08:51
PhoneGap Filesystem Example
/**
* Prepare the App Folder
*/
(function(){
window.appRootDirName = ".myapp";
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("device is ready");
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@dexterous
dexterous / jenkins.sh
Created September 13, 2011 09:20
template jenkins/hudson build script for python with virtualenv
# WORKSPACE set to job workspace by jenkins/hudson
VENV="$WORKSPACE/.env"
if [ ! -e "$VENV" ]; then
virtualenv --python python2.6 --no-site-packages $VENV
elif [ ! -d "$VENV" ]; then
echo '$VENV exists but is not a directory'
exit 1
fi