Skip to content

Instantly share code, notes, and snippets.

View juandesant's full-sized avatar

Juande Santander-Vela juandesant

View GitHub Profile
@wildmichael
wildmichael / convertBibDeskLinks.m
Created October 28, 2010 15:07
Converts the Bdsk-File-X base64 encoded aliases created by BibDesk to normal file paths
@derEremit
derEremit / gource-multiple-repositories.sh
Created November 8, 2011 14:58 — forked from anonymous/gource-multiple-repositories.sh
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
RESOLUTION="1600x1080"
outfile="gource.mp4"
i=0
@mlgill
mlgill / New reminder from Launchbar
Last active May 18, 2021 13:19 — forked from Jayphen/New reminder from Launchbar
A script for quickly adding reminders to the Reminders app in Mountain Lion from Launchbar and Alfred. Save this as a .scpt and drop it in ~/Library/Application\ Support/LaunchBar/Actions
--Script for setting Reminders for LaunchBar and Alfred
--For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work
--For LaunchBar, place the script in ~/Library/Scripts/LaunchBar
--by Michelle L. Gill, 10/07/2012
--Inspired by https://gist.github.com/3187630
--A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder
--Changes
--02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used
-- * Removed the ability to set seconds for the time since Reminders doesn't recognize them
@miguelgrinberg
miguelgrinberg / rest-server.py
Last active March 29, 2024 09:05
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
import numpy as np
import fftw3
import pyfftw
import multiprocessing
import matplotlib
import matplotlib.pyplot as pl
import time
def fft_comparison_tests(size=2048, dtype=np.complex128, byte_align=False):
@juandesant
juandesant / sampy_sample_client.py
Created June 26, 2013 17:36
This gist shows how to use sampy to interact with different VO applications. It assumes you have sampy installed.
#!/usr/bin/env python
from sampy import *
import time
from pprint import pprint
# Setup hub by calling "start_samp_hub.py", it would contain:
# myhub = SAMPHubServer()
# myhub.start(True) # The True makes the script standalone; it should be called with
# alternatively, sampy (/usr/local/bin/sampy, for instance) can be called:
import subprocess
@juandesant
juandesant / Download proper KML file.scpt
Last active December 20, 2015 16:18
Drag-and-drop script to download standalone KML files that do not depend of a network connection, and that can be used with things like online converters, or iOS apps. See article describing the script (in Spanish) here: http://www.entremaqueros.com/bitacoras/memoria/?p=2455
on downloadUrl(theUrl, fileName)
set curlCmd to "curl -s -L -o " & fileName & " '" & theUrl & "' "
--display dialog curlCmd
do shell script curlCmd
end downloadUrl
on run {input, parameters}
set theUrls to {}
repeat with kmlFile in input
#!/usr/bin/env ruby
# PBS 4 Dec. 2013
# Renders HTML for all the .markdown files in the current directory.
# Gives each file a .html suffix.
# Saves them in a subfolder called HTML.
require 'rdiscount'
require 'find'
require 'fileutils'
@sklppr
sklppr / markdown2html.rb
Last active December 30, 2015 08:39 — forked from brentsimmons/generate_html.rb
Batch conversion of Markdown to HTML.
#!/usr/bin/env ruby
require "fileutils"
require "redcarpet"
OUTPUT_FOLDER = "html"
HTML_TEMPLATE = <<-HTML
<!DOCTYPE html>
<html>
@juandesant
juandesant / search_functions.sh
Last active August 14, 2016 14:18
Web-based search bash macros for Mac OS X
# This script only works in Mac OS X, due to the dependency
# on the `open` command.
# It can be directly added into a .profile file, either
# by copying and pasting its content, or sourcing the
# file:
# . search_functions.sh
# Usage: google any search terms
# Result: default browser opens with a query on any