Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex K zexa

  • Nordcode
  • zexa@rizon
View GitHub Profile
@XVilka
XVilka / TrueColour.md
Last active May 9, 2021
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

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)
@azadisaryev
azadisaryev / convertExcel2Sheets
Last active May 9, 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 https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services 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
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active May 6, 2021
Most VPN Services are Terrible
View vpn_psk_bingo.md

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: https://twitter.com/kennwhite/status/591074055018582016

@LukeMathWalker
LukeMathWalker / .gitlab-ci.yml
Last active May 5, 2021
GitLab CI - Rust setup
View .gitlab-ci.yml
image: "rust:latest"
default:
before_script:
- rustc --version
- cargo --version
stages:
- test
@pcworld
pcworld / _README.md
Last active Mar 24, 2021
Linux Spotify Ad Mute
View _README.md
View alert.js
alert('hello ' + document.location.href);
@dmnt3d
dmnt3d / acme-cert-dump.py
Last active Mar 8, 2021 — forked from JayH5/acme-cert-dump.py
Dump certificates from Traefik's acme.json
View acme-cert-dump.py
#!/usr/bin/env python
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
@JayH5
JayH5 / acme-cert-dump.py
Created Oct 19, 2016
Dump certificates from Traefik's acme.json
View acme-cert-dump.py
#!/usr/bin/env python
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
@zexa
zexa / idevicerestore_dependencies.md
Last active Feb 12, 2021
libimobiledevice/idevicerestore dependencies in order
View idevicerestore_dependencies.md

libimobiledevice/idevicerestore dependencies in order

Tested on Ubuntu 20.04 LTS

Dependencies

python3-dev
python-dev