Skip to content

Instantly share code, notes, and snippets.

View ssaavedra's full-sized avatar

Santiago Saavedra ssaavedra

View GitHub Profile
#include <mpfr.h>
#include <gmp.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char*argv[]) {
mpfr_t D, d, q, r;
mpfr_set_default_prec (53);
mpfr_set_emin (-1073); mpfr_set_emax (1024);
/***************************************************************************
* Twitter client for the CLI. *
* Copyright (C) 2013 by Santiago Saavedra and Daniel Valcarce *
* <santiagosaavedra@gmail.com>, <danivalsil@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
@ssaavedra
ssaavedra / proposal.html
Last active December 16, 2015 17:39
My proposal for GNOME at GSoC.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GSoC Proposal</title>
</head>
<body>
<pre>Hi, my name is Santiago Saavedra and I'm studying Computer Science in Spain.<br />I'll adhere to the format specified below for the proposal.&nbsp;</pre>
<pre>1) Please connect with a possible mentor for the project you are proposing early in the application process.
2) It's required that you at least fix one small bug in the module you are applying to work on for us to consider your application.
EXT.get_keywords = function (tab) {
var keywords = [];
if(tab) {
chrome.tabs.executeScript(tab.id, {file:"js/keywords.js"},
(function(keywords) {
return function (res) {
var kw_str = res && res[0];
if (kw_str) {
keywords.push.apply(keywords, kw_str.split(","));
@ssaavedra
ssaavedra / org-clock-back.el
Last active October 1, 2018 11:59
Convert orgmode clocktable time to numbers
;; Receive time as a string like "9d 11:28"
;; Outputs the number of minutes in that
;; The regex works with and without days.
;; MIT License
(defun my-minutes-in-org-time (time)
(let ((re "\\(\\([0-9]+\\)d \\)?\\([0-9]+\\):\\([0-9]+\\)")
(values '(2 3 4)))
(save-match-data
(catch 'exit
(if (not (string-match re time))
#!/bin/sh
# Author: Santiago Saavedra <s.saavedra@fdi.ucm.es>
# License: MIT
#
# Usage:
# 1. Set up Vagrant and VirtualBox
# 2. Download this file:
# curl https://gist.githubusercontent.com/ssaavedra/1ffa0a6f4b51cee04703/raw/run-why3.sh > run-why3.sh
# (or)
# wget https://gist.githubusercontent.com/ssaavedra/1ffa0a6f4b51cee04703/raw/run-why3.sh
@ssaavedra
ssaavedra / .gitignore
Last active April 7, 2016 15:36
CLIR Attempt
*~
*.swp
*.fasl
*.FASL
*.lisp-temp
@ssaavedra
ssaavedra / tco.lisp
Created March 30, 2016 13:46
Improve TCO handling on Common Lisp easy cases
(defpackage :ssaavedra.tco
(:documentation
"Implements some silly optimizations for improved Tail Call
Optimization (TCO) so that when defining a function or a lambda ending
in a `case' or an `if' the enclosing frame can be removed.")
(:use :common-lisp)
(:export :tco-body :case-tco :defun-tco))
(in-package :ssaavedra.tco)
(defun tco-test ()
(defpackage :mypackage
(:use)
(:export :let))
(defpackage :mypackage.impl
(:use :cl))
(in-package :mypackage.impl)
(defmacro mypackage:let (a)
@ssaavedra
ssaavedra / 57-add-emoji-support.conf
Created June 19, 2016 10:36
Add Emoji to Linux Fontconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
EmojiOne Color SVGinOT Font
Author: Santiago Saavedra <ssaavedra@gpul.org>
License: CC0
Year: 2016
Install: