Skip to content

Instantly share code, notes, and snippets.


Justin Force e0da

View GitHub Profile
e0da / socket.rb
Created Jan 2, 2021 — forked from RickCarlino/socket.rb
Bi-directional TCP socket in Ruby
View socket.rb
#Jeepers, this standard library has everything!
require 'socket'
server = "" , 4000
while connection = server.accept do |client|
while (client_input = client.gets.chomp)
e0da /
Last active Sep 16, 2020

e0da prompt

e0da prompt example

.zshrc goes in $HOME, everything else goes in $HOME/share, and you want to brew install zsh-git-prompt. I'm using Gruvbox here with macOS Terminal.

e0da / Enable no-restricted-syntax ForOfStatement when extending airbnb-base in .eslintrc.js
Last active Aug 26, 2020
Disable the airbnb style guide rules that violates the no-restricted-syntax rule when using for...of loops in JavaScript, which are incredible and a wonderful and perfectly valid alternative to Array.prototype.forEach. Fight me.
View Enable no-restricted-syntax ForOfStatement when extending airbnb-base in .eslintrc.js
module.exports = {
extends: ["airbnb-base"],
rules: {
"no-restricted-syntax": [
* for...of is wonderful! Copy the rest of Airbnb's rules.
* Gist permalink:
* Airbnb source:
* Feature discussion:
terminator=$(mktemp --dry-run /tmp/terminator.XXX)
echo "touch $terminator to stop"
while true; do
if [[ -f "$terminator" ]]; then
kill "$CHILD_PID"
echo "Killed $CHILD_PID because the main container terminatord."
sleep 1
View favify.bash
#!/bin/bash -ex
convert \
-density 256x256 \
-background transparent \
e0da /
Created Sep 4, 2019 — forked from chenxiaolong/
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
View sql.rb
cur.execute(<<-'SQL'.gsub('%s', tablename))
SELECT cs.nodeid, database, `table`, `index`, sum(reads) reads,
sum(deletes+inserts+replaces) writes,
count(cs.replica) replicas
FROM system.`databases` AS dbs
JOIN system.`relations` AS rels USING (db)
JOIN system.`representations` AS reps
ON (reps.relation = rels.table)
e0da / xterm-256color-italic.terminfo
Created May 9, 2018 — forked from sos4nt/xterm-256color-italic.terminfo
A xterm-256color based TERMINFO that adds the escape sequences for italic
View xterm-256color-italic.terminfo
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
# Install:
# tic xterm-256color-italic.terminfo
# Usage:
# export TERM=xterm-256color-italic
e0da / simcity_2000_mouse_scroll_bindings.ahk
Last active Aug 20, 2017
Use the vertical scrolling for zoom and horizontal scrolling for rotation when playing SimCity 2000 (SIMCITY.EXE)
View simcity_2000_mouse_scroll_bindings.ahk
if WinActive("ahk_exe SIMCITY.EXE") {
send {Home}
send {End}
e0da / iptorrents.css
Last active Aug 7, 2017
Custom styles for IPTorrents
View iptorrents.css
/* */
#iptStart .topRow {
padding-bottom: 0 !important;
#iptStart .banner {
background-image: none !important;
height: 57px !important;