Skip to content

Instantly share code, notes, and snippets.

/var/folders/4s/l39wbkz55tx10gb1lfdvj6th0000gn/T/python-build.20181120064129.76625 ~
11/20 06:41:31 [NOTICE] Downloading 1 item(s)
11/20 06:41:31 [NOTICE] Allocating disk space. Use --file-allocation=none to disable it. See --file-allocation option in man page for more details.
[#3fb641 6.1MiB/16MiB(37%) CN:1 DL:7.0MiB ETA:1s]
[#3fb641 13MiB/16MiB(80%) CN:1 DL:7.0MiB]
11/20 06:41:34 [NOTICE] Download complete: /private/var/folders/4s/l39wbkz55tx10gb1lfdvj6th0000gn/T/python-build.20181120064129.76625/Python-3.6.7.tar.xz
@klingtnet
klingtnet / how-to-upgrade-nvmw-ssd-firmware-on-linux.md
Last active September 16, 2023 23:37
How to upgrade [Lenovo] NVMe SSD firmware on Linux

The instructions were tested on a Lenovo X1 Carbon 5th Gen (X1C5) on Arch Linux but should be applicable to other Lenovo models and Linux distributions.

BACKUP YOUR DATA! I created a bootable Ubuntu Image like this:

$ sudo sh -c 'curl --location --silent --fail "http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso" | pv > /dev/<your-usb-drive>'
# note that pv is only there to show progress, it is perfectly fine to redirect curl to the usb drive directly.

then I booted from this drive by pressing F12 on reboot and dumped my NVMe disk to an external hard drive like this:

@grantseltzer
grantseltzer / disassembler.go
Created September 14, 2018 06:08
Full disassembler
package main
import (
"debug/elf"
"fmt"
"log"
"os"
"github.com/bnagy/gapstone"
)
@fasiha
fasiha / no-hackerrank.md
Last active August 7, 2023 11:47
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: recruitment@EmployerABC.com
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

@John-Lin
John-Lin / Kubeflow.md
Last active November 10, 2022 19:31
Kubeflow on Minikube

Deploy Kubeflow on Minikube

Install minikube

Please see How to Minikube

Running a minikube with 4CPUs and 8GB memory

$ minikube start --cpus 4 --memory 8192
@mromanello
mromanello / process BMCR.ipynb
Created November 23, 2017 11:23
Quick and dirty notebook to demonstrate the extraction of canonical references from one BMCR record.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wwek
wwek / httpsproxy.go
Created October 29, 2017 05:41
https proxy in golang
// https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c
// #!/usr/bin/env bash
// case `uname -s` in
// Linux*) sslConfig=/etc/ssl/openssl.cnf;;
// Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;;
// esac
// openssl req \
// -newkey rsa:2048 \
// -x509 \
@bnewbold
bnewbold / README.md
Last active October 16, 2017 11:52
Broken python3 gluish TSV unicode

Do the whole thing:

PYTHONPATH='.' luigi --module small Small --local-scheduler
@pteich
pteich / main.go
Last active March 25, 2024 21:50
Example for using go's sync.errgroup together with signal detection signal.NotifyContext to stop all running goroutines
package main
import (
"context"
"errors"
"fmt"
"os/signal"
"syscall"
"time"
@kimsk
kimsk / wheeler.md
Created June 16, 2017 21:50
THE USE OF SUB-ROUTINES IN PROGRAMMES

D. J. Wheeler

Cambridge & Illinois Universities

A sub-routine may perhaps best be described as a self-contained part of a programme, which is capable of being used in different programmes. It is an entity of its own within a programme. There is no necessity to compose a programme of a set of distinct sub-routines; for the programme can be written as a complete unit, with no divisions into smaller parts. However it is usually advantageous to arrange that a programme is comprised of a set of subroutines, some of which have been made specially for the particular programme while others are available from a library of standard sub-routines. The reasons for this will be discussed below.

When a programme has been made from a set of sub-routines the breakdown of the code is more complete than it would otherwise be. This allows the coder to concentrate on one section of a programme at a time without the overall detai