Skip to content

Instantly share code, notes, and snippets.

View ethnt's full-sized avatar
🐢

Ethan Turkeltaub ethnt

🐢
View GitHub Profile
@ethnt
ethnt / flake.nix
Created July 28, 2023 14:14
devenv bug
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devenv.url = "github:cachix/devenv";
# nix2container.url = "github:nlewo/nix2container";
# nix2container.inputs.nixpkgs.follows = "nixpkgs";
# mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
};
@ethnt
ethnt / log.txt
Created April 12, 2022 00:29
binwalk logs
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@ethnt
ethnt / fish.md
Last active October 2, 2022 05:19
Nix install on macOS

Nix install

1. Run Nix install

with fish

sh (curl -L https://nixos.org/nix/install | psub) --darwin-use-unencrypted-nix-store-volume

for zsh with multi user

#d9d9d6,#e1e1de,#e8e8e6,#006c5b,#e1e1de,#18332f,#00b388,#ff5c39
@ethnt
ethnt / expanded.js
Created January 12, 2019 23:40
Aspiration current balance
var available = parseFloat(document.querySelector('.balance .numbers').innerHTML.replace('$', ''));
var pendingTransactionValues = Array.prototype.slice.call(document.querySelectorAll('.transaction-row.pending')).map(element => element.querySelector('.value .amount').innerHTML.split('$'));
var total = 0.0;
values.forEach(function (arr) {
var sign = arr[0];
var value = parseFloat(arr[1]);
@ethnt
ethnt / code.ino
Last active April 27, 2017 18:19
Arduino project
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int buttonPin = 7;
int buttonState;
int buttonPresses = 0;
void setup() {
lcd.begin(16, 2);
@ethnt
ethnt / killer.rb
Last active February 24, 2017 19:39
A resettable timeout for Ruby
require 'redis'
@redis = Redis.new
@redis.set('timeout', 0)
@ethnt
ethnt / london.markdown
Created August 28, 2016 02:18
Studying abroad in London

Cell Service

Three is a good UK-based cell carrier. They have fairly good reception within the Greater London area, but what sold me was their generous data packages and their Feel at Home scheme. Essentially, in 18 different countries, data roaming is free. This is a huge leg-up over other carriers, who will charge a lot of money for international roaming. When I went to other countries that aren’t covered at Feel at Home, I purchased a cheap SIM card with 1GB of data for use while I was in the country. Generally, this would cost about $10.

The Three package I used was the Pay As You Go All in One for £20 a month. This gets you 3000 texts, 300 minutes, and 12GB of data (which is way more than enough — you could watch Netflix over data and still be fine with that amount of data).

To get Three, I just went to a Three store when I arrived. They walked me through the whole process and replaced my SIM card for m

@ethnt
ethnt / gist:901b110e83e259e9d64770b978239cba
Created July 19, 2016 18:51
llvm34 Homebrew install log
==> Installing llvm34 from homebrew/versions
==> Downloading http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz
Already downloaded: /Users/ethan/Library/Caches/Homebrew/llvm34-3.4.2.tar.gz
==> Patching
patching file Makefile.rules
patching file tools/llvm-shlib/Makefile
patching file tools/lto/Makefile
==> Downloading http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.gz
Already downloaded: /Users/ethan/Library/Caches/Homebrew/llvm34--clang-3.4.2.tar.gz
==> Downloading http://llvm.org/releases/3.4.2/libcxx-3.4.2.src.tar.gz
@ethnt
ethnt / chat-backup.rb
Created May 21, 2016 01:10
Ruby script to backup iMessage transcripts.
require 'pry'
require 'sqlite3'
require 'highline/import'
imessage_id = ask "iMessage ID (e.g., +8605555555): "
nickname = ask "Nickname (e.g., Bill): "
db = SQLite3::Database.new('/Users/ethan/Library/Messages/chat.db')
rows = db.execute "select * from message where handle_id=(