Skip to content

Instantly share code, notes, and snippets.

@mschmitt
mschmitt / rki.sh
Last active October 14, 2020 18:49
#!/bin/bash
BASH_LOADABLES_PATH=/usr/lib/bash:/usr/local/lib/bash
enable -f finfo finfo
declare -A query_counties
query_counties['Gießen']='https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=county%20%3D%20%27LK%20GIESSEN%27&outFields=cases7_per_100k&outSR=4326&f=json'
query_counties['Frankfurt']='https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=county%20%3D%20%27SK%20FRANKFURT%20AM%20MAIN%27&outFields=cases7_per_100k&outSR=4326&f=json'
query_counties['Amsterdam']='https://services.arcgis.com/nSZVuSZjHpEZZbRo/arcgis/rest/services/COVID19_gemeente_actueel_vlak/FeatureServer/0/query?f=json&where=Gemeentenummer%3D363&returnGeometry=false&spatialRel=esriSpatialRelIntersects&outFields=Total_reported_delta7_100k'
out="Covid-19-Fälle 7 Tage auf 100000:"
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@lordkhonsu
lordkhonsu / gist:7eca5cbf0440589946c7
Last active February 19, 2023 23:15
bash sed anonymize ip adresses in file

This line will replace the last octet of ipv4 adresses in a given file with a zero:

sed -i '' -e 's/(([0-9]{1,3}.){3})[0-9]{1,3}/\10/g'

@mlgill
mlgill / New reminder from Launchbar
Last active May 18, 2021 13:19 — forked from Jayphen/New reminder from Launchbar
A script for quickly adding reminders to the Reminders app in Mountain Lion from Launchbar and Alfred. Save this as a .scpt and drop it in ~/Library/Application\ Support/LaunchBar/Actions
--Script for setting Reminders for LaunchBar and Alfred
--For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work
--For LaunchBar, place the script in ~/Library/Scripts/LaunchBar
--by Michelle L. Gill, 10/07/2012
--Inspired by https://gist.github.com/3187630
--A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder
--Changes
--02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used
-- * Removed the ability to set seconds for the time since Reminders doesn't recognize them
@lexande
lexande / moshalias.pl
Created May 10, 2012 02:48
Wrapper script to use mosh when possible and fall back to ssh otherwise
#!/usr/bin/perl
my $ssh="/usr/bin/ssh";
my $mosh="/usr/bin/mosh";
my $host;
my $unsupported=0;
for (my $i=0; $i <= $#ARGV; $i++) {
if ($ARGV[$i] =~ /^-/) {
$ssh .= " \"$ARGV[$i]\"";
@hmans
hmans / whatever-manifesto.md
Created April 23, 2012 16:30
The Whatever Manifesto

THE WHATEVER MANIFESTO

  1. Follow your dreams (or don't. Whatever.)
  2. Work sane hours (or don't. Whatever.)
  3. Separate work from life (or don't. Whatever.)
  4. Build a fun side project (or don't. Whatever.)
  5. Always be open to new ideas (or don't. Whatever.)
  6. Learn how to manage your money (or don't. Whatever.)

Whatever it is that you choose to do, follow these two simple rules: