Skip to content

Instantly share code, notes, and snippets.

View DeltaWhy's full-sized avatar

Michael Limiero DeltaWhy

View GitHub Profile
@DeltaWhy
DeltaWhy / Dockerfile
Last active September 24, 2021 22:37
Poetry bug repro
FROM python:3.9
RUN pip list
RUN pip install poetry 'setuptools<58'
COPY . /app
WORKDIR /app
RUN poetry install -vvv || poetry run pip list && false
@DeltaWhy
DeltaWhy / keybase.md
Created February 6, 2020 01:05
keybase proof

Keybase proof

I hereby claim:

  • I am deltawhy on github.
  • I am deltawhy (https://keybase.io/deltawhy) on keybase.
  • I have a public key ASCs-JnuTBVcsMSkptdzRl_cVn9XJ_V6k_lCQCHj7ukGawo

To claim this, I am signing this object:

#!/usr/bin/env ruby
require 'open-uri'
class IpInfoDb
attr_reader :source
URI = "http://ipinfodb.com"
@DeltaWhy
DeltaWhy / world_update.py
Last active August 29, 2015 14:11
Minecraft 1.8 world updater
#1. Download Khroki/MCEdit-Unified.
#2. Copy this script and your existing Minecraft world into the MCEdit-Unified folder.
#3. Run the script to add the new stone types and regenerate rabbits, horses, and wolves.
from __future__ import print_function
import pymclevel
import pymclevel.minecraft_server
import time
import sys
def playerChunk(world):
#!/bin/sh
cd "/run/media/michael/Backup/Screencasts Raw/"
echo "Select monitor device:"
pactl list sinks | sed -rn 's/\s+Description: (.*)/\1/p' | nl
read -p "? "
monitor=$(pactl list sinks | sed -rn 's/\s+Name: (.*)/\1/p' | sed -n "${REPLY}p")
pacmd set-default-sink ${monitor}
echo "Select microphone:"
pactl list sources | sed -rn '/Monitor of/d; s/\s+Description: (.*)/\1/p' | nl
@DeltaWhy
DeltaWhy / gtother-login.sh
Created September 8, 2014 15:01
Wicd GTother login script
#!/bin/bash
# Drop in /etc/wicd/scripts/postconnect/
# Chown to root:root and chmod to 700 since it has your password in plaintext
connection_type="$1"
essid="$2"
bssid="$3"
if [ "${connection_type}" == "wireless" ]; then
if [ "${essid}" == "GTother" ]; then
@DeltaWhy
DeltaWhy / etc.wicd.encryption.peap-aes
Created September 2, 2014 18:54
GTwifi wicd configs
name = PEAP with AES/MSCHAPV2
author = Douglass
version = 1
require identity *Username password *Password
optional ca_cert *Path_to_CA_Cert
-----
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$_ESSID"
proto=RSN
@DeltaWhy
DeltaWhy / gist:5432349
Created April 22, 2013 03:55
GTwifi configuration
CONNECTION='wireless'
DESCRIPTION=''
INTERFACE='wlp3s0'
SECURITY='wpa-configsection'
IP='dhcp'
CONFIGSECTION='
ssid="GTwifi"
key_mgmt=WPA-EAP
proto=RSN
eap=PEAP
@DeltaWhy
DeltaWhy / gist:5420358
Created April 19, 2013 13:29
Fun with Ruby hashes
1.9.3p362 :001 > h = {}
=> {}
1.9.3p362 :002 > h[:h] = h
=> {:h=>{...}}
1.9.3p362 :003 > h
=> {:h=>{...}}
1.9.3p362 :004 > h[:h]
=> {:h=>{...}}
1.9.3p362 :005 > h[:h][:h]
=> {:h=>{...}}
@DeltaWhy
DeltaWhy / gist:5364057
Last active December 16, 2015 02:39
Turn a CSV file (where the first line contains the column names) into an array of hashes
def parse_csv
csv = CSV.parse(STDIN.read)
columns = csv[0].map(&:to_sym)
csv.delete_at(0)
csv.map do |row|
Hash[columns.zip(row)]
end
end