I hereby claim:
- I am frantzmiccoli on github.
- I am frantzmiccoli (https://keybase.io/frantzmiccoli) on keybase.
- I have a public key ASAiqAa7ifmI-TxwqgucIKM8TbsMEkNDJwDaGPuzmtzMZwo
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
# Usage: | |
# envcheck source/.env.template source/.env | |
import sys | |
def main(): | |
variables_sets_list = _get_variables_set_list() |
function duplicateRootFolder() { | |
var templateFolder = DriveApp.getFolderById('PUT YOUR TEMPLATE FOLDER ID HERE (FROM YOUR BROWSER URL)'); | |
var targetParent = DriveApp.getFolderById('PUT YOU PARENT FOLDER ID HERE (FROM YOUR BROWSER URL)'); | |
duplicateFolder(templateFolder, targetParent, false); | |
} | |
function duplicateFolder(templateFolder, targetParent, useTemplateName) { | |
var newFolderName = templateFolder.getName(); |
echo "<?php echo password_hash('hello', PASSWORD_DEFAULT); echo \"\n\";" > test.php; php test.php; php test.php |
#!/usr/local/bin/python -- | |
# -*- coding: utf-8 -*- | |
from paver.easy import sh | |
import os | |
import sys | |
clear_flag = '--clear' | |
def local_sync(): |
<?php | |
$a = []; | |
$threshold = 120; | |
while (count($a) < 400) { | |
$v = count($a) > $threshold ? 'a' : 'b'; | |
$a[] = $v; | |
} |
I hereby claim:
To claim this, I am signing this object:
# Data source https://www.maxmind.com/en/worldcities | |
# Using https://github.com/Russell91/pythonpy | |
# 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)+','" |
// Run me on http://en.wikipedia.org/wiki/List_of_metropolitan_areas_by_population | |
// from http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery | |
var getTextNodesIn = function($el) { | |
return $($el.find(":not(iframe)").addBack().contents().filter(function() { | |
return this.nodeType == 3; | |
}).get(0)).text(); | |
}; | |
var rowsSelector = '#bodyContent .sortable.wikitable.jquery-tablesorter tr', |
// Run me in your console on http://en.wikipedia.org/wiki/List_of_cities_proper_by_population | |
// from http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery | |
var getTextNodesIn = function($el) { | |
return $($el.find(":not(iframe)").addBack().contents().filter(function() { | |
return this.nodeType == 3; | |
}).get(0)).text(); | |
}; | |
var rowsSelector = '#bodyContent .sortable.wikitable.jquery-tablesorter tr', |
#!/usr/bin/env zsh | |
# Usage: 'imgccsearch "beautiful pictures"' | |
term=$1 | |
open "https://500px.com/search?q=$term&type=photos&ccLicense=by&sort=relevance" | |
open "https://500px.com/search?q=$term&type=photos&ccLicense=by-nc&sort=relevance" | |
open "https://500px.com/search?q=$term&type=photos&ccLicense=by-sa&sort=relevance" | |
open "https://500px.com/search?q=$term&type=photos&ccLicense=by-nd&sort=relevance" | |
open "https://500px.com/search?q=$term&type=photos&ccLicense=by-nc-sa&sort=relevance" |