Skip to content

Instantly share code, notes, and snippets.

View phlummox's full-sized avatar

phlummox phlummox

View GitHub Profile
@phlummox
phlummox / delegate.c
Created July 26, 2023 13:57 — forked from rusek/delegate.c
Interpreter path relative to script location in shebang
/*
Helper program for resolving the path to the interpreter executable
relative to the script location in shebangs.
Sample usage:
#!/usr/bin/delegate ../my-virtualenv/bin/python
import sys
def main():

Readable Bookmarklet

Bookmarklet Browser Enhancement Readability

Readable dark theme

rdbl.us

Readable is an application that helps you read more of the web. It reformats text — on any website — according to your exact specifications.

@phlummox
phlummox / emulator-install-using-avdmanager.md
Created February 7, 2023 12:01 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@phlummox
phlummox / new-python-project-with-tox-and-pytest.md
Created January 17, 2023 05:07 — forked from gene1wood/new-python-project-with-tox-and-pytest.md
Example of the directory structure, setup.py, tox.ini and pytest tests for a new python project

Directory structure

projectname/                 [1]
├── projectname              [2]
│   ├── __init__.py
├── README.md
├── setup.py
├── tests
│   └── test_projectname.py
@phlummox
phlummox / firebase.tf
Created January 12, 2023 11:30 — forked from zebreus/firebase.tf
Terraform configuration for creating a firebase project with firestore, functions and storage
# firebase.tf https://gist.githubusercontent.com/Zebreus/906b8870e49586adfe8bd7bbff43f0a8/raw/firebase.tf
# Terraform configuration for creating a firebase project with firestore, functions and storage
# Unfinished
terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = "4.11.0"
}
@phlummox
phlummox / programming-as-theory-building.md
Created December 28, 2022 12:43 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@phlummox
phlummox / AdbCommands
Created January 12, 2022 03:33 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@phlummox
phlummox / BlahutArimoto.m
Created April 17, 2017 13:33 — forked from Piyush3dB/BlahutArimoto.m
Blahut-Arimoto algorithm implementation in Matlab
function [C r] = BlahutArimoto(p)
disp('BlahutArimoto')
% Capacity of discrete memoryless channel
% Blahut-Arimoto algorithm
% Input
% p: m x n matrix
% p is the transition matrix for a channel with m inputs and n outputs