Skip to content

Instantly share code, notes, and snippets.

View ssaavedra's full-sized avatar

Santiago Saavedra ssaavedra

View GitHub Profile
@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))
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 / 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.
/***************************************************************************
* 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. *
***************************************************************************/
#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);