Skip to content

Instantly share code, notes, and snippets.

View mariomartinezsz's full-sized avatar

Mario Martínez Sánchez mariomartinezsz

View GitHub Profile
@mrzmyr
mrzmyr / gist:977fc7d8bee58db9d96f
Last active September 10, 2020 10:04
Launching external maps applications (Ionic, Google Maps, Apple Maps) on Android and iOS
<!-- https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html -->
<a href="maps://?q=dallas" data-rel="external">iOS launch in apple maps</a>
<!-- https://developers.google.com/maps/documentation/ios/urlscheme -->
<a href="comgooglemaps://?q=dallas" data-rel="external">iOS launch in google maps</a>
<a href="geo://0,0?q=dallas" data-rel="external">Android launch in google maps</a>
@damienstanton
damienstanton / env.sh
Last active August 29, 2015 14:10
Make a Virtualenv in Ubuntu 14.04 with Python 3.4
# Workaround for the ensurepip problem: https://lwn.net/Articles/592007/
# --------------------------------------
# Usage:
# Add this script to your path, then run
# env.sh my_virtualenv_name
# --------------------------------------
pyvenv-3.4 --without-pip $1
source ./$1/bin/activate
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz
@rkfg
rkfg / gifcreate
Last active February 4, 2021 21:01
GIF animation script to cut a piece of video and produce a frame-accurate optimized GIF with a precise framerate.
#!/bin/sh
help () {
log "Usage: `basename $0` [-h] [-n] [-a] [-u] [-s hh:mm:ss] [-d ss] [-w px] [-f n] [-S n] [-b n] [-t subtitle.sub] [-c default | basic | fontsize | fontstyle | full] <filename> [result.gif]
-h show this help
-n turn off subtitles
-a don't open directory with frames in filemanager
-u update this script from gist. Create .gifupd file in the script's directory to automatically check for updates once per day or put the number of seconds in the file to check with that period.
-s start time in seconds or as hours:minutes:seconds, default: 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Simple script to create geojson from osm files.
Prints geojson features line by line.
Currently we don't support relations.
Requires (unmodified) imposm and imposm.parser
Inspired by https://github.com/emka/OSMCouch
'''
@luixal
luixal / RestClient.java
Created February 13, 2011 04:10
Calling WebServices through HttpClient: A RestClient class for calling webservice using both, get and post methods, and getting the response dropped into an String.
public class RestClient {
private ArrayList<NameValuePair> params;
private ArrayList<NameValuePair> headers;
private String url;
private int responseCode;
private String message;