Skip to content

Instantly share code, notes, and snippets.

Fräntz Miccoli frantzmiccoli

Block or report user

Report or block frantzmiccoli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Funny hashing
echo "<?php echo password_hash('hello', PASSWORD_DEFAULT); echo \"\n\";" > test.php; php test.php; php test.php
frantzmiccoli / localsync
Last active May 30, 2019
Dirty little script
View localsync
#!/usr/local/bin/python --
# -*- coding: utf-8 -*-
from paver.easy import sh
import os
import sys
clear_flag = '--clear'
def local_sync():
frantzmiccoli / associative-sort.php
Created Dec 10, 2018
Just a quick demo highlighting that PHP doesn't preserve same-value keys order while running an associative sort
View associative-sort.php
$a = [];
$threshold = 120;
while (count($a) < 400) {
$v = count($a) > $threshold ? 'a' : 'b';
$a[] = $v;

Keybase proof

I hereby claim:

  • I am frantzmiccoli on github.
  • I am frantzmiccoli ( on keybase.
  • I have a public key ASAiqAa7ifmI-TxwqgucIKM8TbsMEkNDJwDaGPuzmtzMZwo

To claim this, I am signing this object:

frantzmiccoli / filtered-cities.zsh
Last active Aug 29, 2015
Cities filtered by size
View filtered-cities.zsh
# Data source
# Using
# We first extract the cities with more than 500000 inhabitants
# We then filter those in relevant countries
# We generate a string close to json from the output
cat worldcitiespop.txt|py -fx --i '(int(x.split(",")[4]) > 500000)'|\
py -fx "x.split(',').pop(0) in ['us', 'it', 'es', 'pt', 'gb', 'ie', 'is', 'it', 'fr', 'ca', 'be', 'de', 'at', 'dk', 'se', 'fi', 'nl', 'no', 'ch', 'en','lu', 'pl']" |\
py -x "json.dumps({'name': x.split(',')[2], 'latitude': float(x.split(',')[5]), 'longitude': float(x.split(',')[6])}, indent=4, sort_keys=True)+','"
frantzmiccoli / richvspoorurbanareas.js
Last active Aug 29, 2015
Splitting world's biggest urban area between rich and poor to compute a sum of those population.
View richvspoorurbanareas.js
// Run me on
// from
var getTextNodesIn = function($el) {
return $($el.find(":not(iframe)").addBack().contents().filter(function() {
return this.nodeType == 3;
var rowsSelector = '#bodyContent .sortable.wikitable.jquery-tablesorter tr',
frantzmiccoli / extractdatafrombiggestcities in the world
Last active Aug 29, 2015
A small script that extract population and data from Wikipedia's list of biggest cities, it can be easily adapted for other pages and other informations.
View extractdatafrombiggestcities in the world
// Run me in your console on
// from
var getTextNodesIn = function($el) {
return $($el.find(":not(iframe)").addBack().contents().filter(function() {
return this.nodeType == 3;
var rowsSelector = '#bodyContent .sortable.wikitable.jquery-tablesorter tr',
frantzmiccoli / imgccsearch
Last active Jul 6, 2016
Looking at creative commons pictures and tired of switching doing the same things to test all licenses and all sites? This small script is for you. It looks on 500px, Flickr and many cool other ones
View imgccsearch
#!/usr/bin/env zsh
# Usage: 'imgccsearch "beautiful pictures"'
open "$term&type=photos&ccLicense=by&sort=relevance"
open "$term&type=photos&ccLicense=by-nc&sort=relevance"
open "$term&type=photos&ccLicense=by-sa&sort=relevance"
open "$term&type=photos&ccLicense=by-nd&sort=relevance"
open "$term&type=photos&ccLicense=by-nc-sa&sort=relevance"
frantzmiccoli /
Last active Dec 29, 2015
OVH Sold Out helper. A 2 cents bash script to help you monitor when OVH sold-out will finally end. It works on Mac OSX Mountain Lion, it needs to be tested/adapted for other OS.
#!/bin/bash --
# To use it
# watch -n 15
if r=`curl|grep mSP|grep -s -m 1 "Sold Out"`
echo "Found this wonderful sold out message!"
message="OVH is back in business"
You can’t perform that action at this time.