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(","));
#!/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 / 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 ()
@ssaavedra
ssaavedra / .gitignore
Last active April 7, 2016 15:36
CLIR Attempt
*~
*.swp
*.fasl
*.FASL
*.lisp-temp
(defpackage :mypackage
(:use)
(:export :let))
(defpackage :mypackage.impl
(:use :cl))
(in-package :mypackage.impl)
(defmacro mypackage:let (a)
#!/usr/bin/env python3
# -*- coding: utf-8; -*-
# Author: Santiago Saavedra <ssaavedra@gpul.org>
# License: MIT
# Description:
# This script detects raspberries and sorts them by last-seen time.
# It also tries to inspect whether they still have their default
# password set.
# We found it specially interesting in IoT Hackathons and the like
# for participants to easily spot theirs (and actively remember
@ssaavedra
ssaavedra / roswell.spec
Last active September 8, 2016 16:55
roswell specfile
Name: roswell
Version: 0.0.6.65
Summary: A lisp installer and launcher for major environments that just work
Release: 1%{?dist}
License: MIT
URL: https://github.com/roswell/roswell/
Source0: https://github.com/roswell/roswell/archive/v%{version}.tar.gz
Group: Development/Tools
BuildRequires: libcurl-devel