Skip to content

Instantly share code, notes, and snippets.

Reviewing bad code

Alex K zexa

Reviewing bad code
  • Some Fintech Company
  • zexa@rizon
View GitHub Profile
zexa /
Last active Feb 12, 2021
libimobiledevice/idevicerestore dependencies in order

libimobiledevice/idevicerestore dependencies in order

Tested on Ubuntu 20.04 LTS


JayH5 /
Created Oct 19, 2016
Dump certificates from Traefik's acme.json
#!/usr/bin/env python
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
kennwhite /
Last active Jan 28, 2021
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion:

azadisaryev / convertExcel2Sheets
Last active Feb 5, 2021
Google Apps Script for converting Excel (.xls or .xlsx) file to Google Spreadsheet. Drive API must be enabled in your script's Advanced Google Services and in Developers Console for the script to work (see for details).
View convertExcel2Sheets
* Convert Excel file to Sheets
* @param {Blob} excelFile The Excel file blob data; Required
* @param {String} filename File name on uploading drive; Required
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder
* @return {Spreadsheet} Converted Google Spreadsheet instance
function convertExcel2Sheets(excelFile, filename, arrParents) {
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not
XVilka /
Last active Feb 26, 2021
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
View alert.js
alert('hello ' + document.location.href);
donaldallen / wp_list_table
Created Sep 17, 2013
WP_List_Table example.
View wp_list_table
if ( ! class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
class Events_List_Table extends WP_List_Table
function __construct()
global $status, $page;
pcworld /
Last active Jan 23, 2021
Linux Spotify Ad Mute
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name: