Skip to content

Instantly share code, notes, and snippets.

View IllyaMoskvin's full-sized avatar

Illya Moskvin IllyaMoskvin

View GitHub Profile
@alukach
alukach / parse-inventory-progress.py
Last active October 6, 2023 18:40
Parsing S3 Inventory results in Python
#! /usr/bin/env python3
"""
A utility to stream records from one or many S3 Inventory reports, with a progress bar.
./parse-inventory-progress s3://my-bucket/path/to/my/inventory/2019-12-15T00-00Z/manifest.json > out.csv
"""
import json
import csv
import gzip
import sys
@felixlohmeier
felixlohmeier / openrefine-webserver-install.md
Last active January 17, 2024 10:14
How To Install OpenRefine on a web server with Ubuntu 22.04

How To Install OpenRefine on a web server with Ubuntu 22.04

OpenRefine is intended to be installed locally as a desktop application. Due to the client-server architecture it is also possible to install OpenRefine on a web server to share it with multiple users. This can be useful despite the missing user administration, e.g. temporarily for a workshop or permanently in a protected network.

Security warning

Can I somehow host OpenRefine for others to access ?

@itod
itod / split_keyboards.md
Last active May 23, 2024 01:51
Every "split" mechanical keyboard currently being sold that I know of
@VinceG
VinceG / Builder.php
Created October 19, 2016 14:16
Laravel support for replace into / insert ignore / insert on duplicate key update
<?php
namespace App\Library\Database\Query;
use Illuminate\Database\Query\Builder as QueryBuilder;
class Builder extends QueryBuilder
{
/**
* Insert a new record into the database.
@hannesl
hannesl / cantor_pairing.php
Created December 18, 2013 23:02
Cantor pairing functions in PHP. Pass any two positive integers and get a unique integer back. Feed the unique integer back into the reverse function and get the original integers back. Explanation and JS implementation here: http://stevegardner.net/2012/07/09/javascript-cantor-pairing-function-and-reverse-function/
<?php
/**
* Calculate a unique integer based on two integers (cantor pairing).
*/
function cantor_pair_calculate($x, $y) {
return (($x + $y) * ($x + $y + 1)) / 2 + $y;
}
/**