Skip to content

Instantly share code, notes, and snippets.

View tnibert's full-sized avatar

Timothy Nibert tnibert

View GitHub Profile
@prrao87
prrao87 / install_postman_mint_no_snap.md
Last active March 22, 2025 09:13
Install Postman on Linux Mint (without using snap)

Goal

Postman is a usefull app to build and test APIs, most commonly installed on ubuntu-like systems via snap. On recent distributions of Linux Mint (20 and above), snap installs are no longer possible. The instructions below show how to install Postman via the terminal.

Download Postman

$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz

Extract archive

$ sudo tar -xzf postman.tar.gz -C /opt

Make symlink

@andrebrait
andrebrait / keychron_linux.md
Last active March 25, 2025 11:50
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@wasamasa
wasamasa / checkinstance.rb
Last active February 4, 2023 10:12
See the local timeline of any Mastodon instance
#!/usr/bin/env ruby
require 'json'
require 'http'
def api_request(instance, path, params)
uri = URI::HTTPS.build(host: instance, path: path,
query: URI.encode_www_form(params))
res = HTTP.headers(accept: 'application/json').get(uri)
raise("HTTP error #{res.status.to_i}") unless res.status.ok?
@arthurbeggs
arthurbeggs / install_quartus17.sh
Created November 2, 2019 03:15
Install Quartus Prime Lite 17.0 in Ubuntu
#!/bin/bash
################################################################################
### Install Quartus and ModelSim ###
################################################################################
# Source code at https://github.com/arthurbeggs/scripts #
################################################################################
# #
# Based on https://github.com/jessebarreto/ConfigureWorkspace script. #
# #
@mortymacs
mortymacs / Python_Hash_Join.py
Created October 11, 2018 06:25 — forked from nickwhite917/Python_Hash_Join.py
Hash join implemented in Python.
from collections import defaultdict
def hashJoin(table1, index1, table2, index2):
h = defaultdict(list)
# hash phase
for s in table1:
h[s[index1]].append(s)
# join phase
return [(s, r) for r in table2 for s in h[r[index2]]]
@supix
supix / postgres_recovery.md
Last active March 24, 2025 12:46
Postgres error: Missing chunk 0 for toast value in pg_toast

The problem

In some cases, it is possible that PostgreSQL tables get corrupted. This can happen in case of hardware failures (e.g. hard disk drives with write-back cache enabled, RAID controllers with faulty/worn out battery backup, etc.), as clearly reported in this wiki page. Furthermore, it can happen in case of incorrect setup, as well.

One of the symptoms of such corruptions is the following message:

ERROR: missing chunk number 0 for toast value 123456 in pg_toast_45678

This almost surely indicates that a corrupted chunk is present within a table file. But there is a good way to get rid of it.

@PHPirates
PHPirates / git-bundles.md
Last active January 10, 2025 14:26
How to use git bundles

Let machine M be the Main machine with the repo, and A the Auxiliary machine which wants to help out.

First time setup

  1. Machine M creates bundle with complete repo:
git bundle create repo.bundle HEAD master
  1. M sends repo.bundle to A.
  2. A clones repo from bundle:
@dries007
dries007 / ModelSim 17.1 for (Arch) Linux.md
Last active September 30, 2024 13:35
ModelSim 17.1 for (Arch) Linux

ModelSim 17.1 (Starters Edition) for (Arch) Linux

You need to download the setup file yourself. Put in where you run the setup script. Easy DL link It should be named ModelSimSetup-17.1.0.590-linux.run.

  1. Install dependencies (some AUR, both 32 and 64 bit is required.)
    • 64 bit: expat fontconfig freetype2 xorg-fonts-type1 glibc gtk2 libcanberra libpng libpng12 libice libsm util-linux ncurses tcl tcllib zlib libx11 libxau libxdmcp libxext libxft libxrender libxt libxtst
    • 32 bit lib32-expat lib32-fontconfig lib32-freetype2 lib32-glibc lib32-gtk2 lib32-libcanberra lib32-libpng lib32-libpng12 lib32-libice lib32-libsm lib32-util-linux lib32-ncurses lib32-zlib lib32-libx11 lib32-libxau lib32-libxdmcp lib32-libxext lib32-libxft lib32-libxrender lib32-libxt lib32-libxtst
  • ncurses compat libs: ncurses5-compat-libs and lib32-ncurses5-compat-libs
@steven2358
steven2358 / ffmpeg.md
Last active March 12, 2025 01:04
FFmpeg cheat sheet
@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)