Skip to content

Instantly share code, notes, and snippets.

View hedoluna's full-sized avatar

Orlando hedoluna

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aborruso
aborruso / 00_ambasciate.sh
Last active February 25, 2018 10:45
Per scaricare l'elenco delle ambasciate e dei consolati italiani all'estero (c'è una storia alle spalle http://bit.ly/2CGmoWu)
#!/bin/bash
set -x
curl "https://www.esteri.it/mae/it/ministero/laretediplomatica/rete-diplomatica-mappa.html?tipo=0" |
pup 'div[id="map"] + script text{}' | sed -r 's/..$//g;s/initMap\(//g' | jq . | in2csv -I -f json |
tee 01_ambasciate.csv | csvgrep -i -c "lat" -r "^$" | csvjson -I --lat lat --lon lng |
jq . >02_ambasciate.geojson
curl "https://www.esteri.it/mae/it/ministero/laretediplomatica/rete-diplomatica-mappa.html?tipo=1" |
@Arkham
Arkham / memeorama.md
Last active December 30, 2015 00:49
Meme-O-Rama

Meme-O-Rama!

The Basics

Setup a new Rails app and start it

  • rails new memeorama
  • rails server

Create our first scaffold

  • rails generate scaffold meme name:string description:text picture:string
@tedmiston
tedmiston / webcam-cv2.py
Last active May 4, 2023 11:56
Display the webcam in Python using OpenCV (cv2)
"""
Simply display the contents of the webcam with optional mirroring using OpenCV
via the new Pythonic cv2 interface. Press <esc> to quit.
"""
import cv2
def show_webcam(mirror=False):
cam = cv2.VideoCapture(0)
@podefr
podefr / LICENSE.txt
Created October 25, 2011 12:54 — forked from 140bytes/LICENSE.txt
Finite State Machine
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Olivier Scherrer
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE