Skip to content

Instantly share code, notes, and snippets.

View jpluimers's full-sized avatar

Jeroen Wiert Pluimers jpluimers

  • wiert.me
  • Amsterdam, The Netherlands
View GitHub Profile
@jpluimers
jpluimers / facebook-contact-info-summary.rb
Created March 24, 2018 13:27 — forked from dylanmckay/facebook-contact-info-summary.rb
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
@jpluimers
jpluimers / semantic-pedantic.md
Created April 29, 2018 09:54 — forked from jashkenas/semantic-pedantic.md
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@jpluimers
jpluimers / semantic-pedantic.md
Created April 29, 2018 09:54 — forked from jashkenas/semantic-pedantic.md
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@jpluimers
jpluimers / SemanticVersion.cs
Created April 29, 2018 09:55 — forked from yadyn/SemanticVersion.cs
Semantic Version C# class
using System;
using System.Collections.Generic;
using System.Text;
/// <summary>
/// Represents assembly, application, or other version information,
/// compliant with the Semantic Versioning specifications.
/// </summary>
/// <remarks>
/// See http://semver.org/ for specifications.
@jpluimers
jpluimers / consolefonts.ps1
Created May 9, 2018 15:34 — forked from AnthonyMastrean/consolefonts.ps1
Add font choices to the console
$script:ConsoleFontsKey = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont"
<#
.SYNOPSIS
Add a font to the available fonts list in the console.
.DESCRIPTION
This function will confirm that the font you provide is installed in the
system. And will confirm and manage adding the font properly to the
registry, per the rules.
@jpluimers
jpluimers / clean_code.md
Created August 18, 2018 13:09 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jpluimers
jpluimers / zypper_dup_print_urls.py
Created October 17, 2018 18:35 — forked from harish2704/zypper_dup_print_urls.py
parallel downloads while doing zypper distribution upgrade
#!/usr/bin/env python2
"""
This script will print package urls which need to be downloaded for 'distrubution upgrade'
Printed urls can be used for downloading packages in parallel.
For eg: we can use GNU parallel commanline tool along with wget/curl for parallel downloading
python2 zypper_dup_print_urls.py | parallel --tmuxpane -j4 --colsep ' ' mkdir -p '{1}/{2}' \; cd '{1}/{2}' \; wget -c {3}
will download packages with 4 simultaneous downloads
"""
@jpluimers
jpluimers / pr.md
Created December 19, 2018 19:53 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

// 1. open chrome://settings/searchEngines
// 2. press Ctrl-Shift-J to open console
// 3. paste the following code
// note: you may have to run it multiple times to get rid of all of them
// If you have search engines you want to use add the text "(KEEP)" to their name
// and by name i mean the "Search engine" field when you add/edit one of the search engines
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList()
.then(function (val) {
@jpluimers
jpluimers / chocolateyInstall.ps1
Created March 26, 2019 12:47 — forked from cjuroz/chocolateyInstall.ps1
Chocolatey script to install Visual Studio 2017 from local NAS using offline installer. More info about how to create offline installer here: https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio
## USAGE EXAMPLES
# installs CoreEditor (the IDE), ManagedDesktop (.NET framework applications), NetCoreTools (.NET core applications), NetWeb (ASP.NET) + active product using provided Product Key
# choco install visualstudio2017enterprise.pls -y --params "/Features:Microsoft.VisualStudio.Workload.CoreEditor,Microsoft.VisualStudio.Workload.ManagedDesktop,Microsoft.VisualStudio.Workload.NetCoreTools,Microsoft.VisualStudio.Workload.NetWeb /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
# silent bare minimum installation with product key activation. The minimum installation contains only the Core Editor workload (Microsoft.VisualStudio.Workload.CoreEditor)
# choco install visualstudio2017enterprise.pls -y --params "/ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
# silent bare minimum installation without product key activation
# choco install visualstudio2017enterprise.pls -y