Skip to content

Instantly share code, notes, and snippets.

View kikofernandez's full-sized avatar

Kiko Fernandez-Reyes kikofernandez

View GitHub Profile
@kikofernandez
kikofernandez / EEP-DeprecationOfArgumentsErlang.md
Created October 5, 2022 09:39
EEP Deprecation of function arguments to Erlang
Author: Kiko Fernandez-Reyes <kiko@erlang.org>
Status: Draft
Type: Standards Track
Created: 10-Oct-2022
Post-History:
Replaces: 2, 3

EEP 61: Deprecation of types in functions

@kikofernandez
kikofernandez / biblio.py
Last active November 26, 2020 13:21
Capitalise title
# Original by Daniel L. Greenwald
# http://dlgreenwald.weebly.com/blog/capitalizing-titles-in-bibtex
# Modified by Garrett Dash Nelson
import re
from titlecase import titlecase
def capitalise(x):
if x[0].isupper():
x = "{" + x[0] + "}" + x[1:]
@kikofernandez
kikofernandez / MapReduce.java
Last active May 10, 2019 10:23
Example of a MongoDB map-reduce with a composite key, sorting the result set in the reduce operation. JavaScript example and its correspondent equivalent in Java
Mongo mongo = new Mongo(hosts);
String mapFn = "function(){ var value = {"+
"title: this.title,"+
"author: this.author,"+
"ISBN: this.ISBN,"+
"description: this.description"+
"};"+
"emit({rating: this.rating, author: this.author.id}, value);"+
"}";

Keybase proof

I hereby claim:

  • I am kikofernandez on github.
  • I am kikofernandez (https://keybase.io/kikofernandez) on keybase.
  • I have a public key ASDGencYx46AwAQce3kqbfM4mYVSH9Ab22nGBe3zq1u4rgo

To claim this, I am signing this object:

@kikofernandez
kikofernandez / pandoc.css
Created December 19, 2017 08:45 — forked from killercup/pandoc.css
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 / workaround.md
Created September 12, 2016 20:07 — forked from kgrz/workaround.md
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:

@kikofernandez
kikofernandez / Berksfile
Last active December 20, 2015 16:09
chef-solo code for installing nginx and datomic
site :opscode
cookbook 'nginx'
cookbook 'chef-leiningen'
@kikofernandez
kikofernandez / Install Ruby On EC2
Created June 22, 2013 10:06
In order for you to very quickly get up and running with rbenv & the latest Ruby MRI. Just copy it and run it. Original Author: Parker J. Moore
# Taken from http://blog.parkermoore.de/2013/02/06/install-rbenv-on-ubuntu-12-dot-04/
# Author: Parker J. Moore
# I couldn't find the Gist...
sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core make make-doc
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL # Restart the shell
@kikofernandez
kikofernandez / handler.clj
Last active December 17, 2015 12:09
Small example of Compojure handler working with the LinkedIn API using REST Web Services.
(ns linkedin-clojure.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]
[hiccup.page :as hpage]
[hiccup.form :as form]
[cheshire.core :as parse]
[ring.util.response :as response]
[clj-http.client :as client]))
@kikofernandez
kikofernandez / detail.html
Last active December 16, 2015 11:49
we are going to show how to use and forge a friendship between the back-end and front-end. For the back-end, we are going to use Clojure (Compojure + Hiccup + Ring + Sandbar), and for the front-end, we are going to use AngularJS. We are going to use AngularJS for building small mini-applications that do something very specific, call it domain dr…
<label>Título: </label>
<input type="text" name="titulo" ng-model="question.title">
<label>Respuestas: </label>
<ul ng-repeat="answer in answers" ng-model="answers">
<li>{{answer.title}}</li>
</ul>
<input type="text" name="answer" ng-model="answer">