Skip to content

Instantly share code, notes, and snippets.

View e0da's full-sized avatar

Justin Force e0da

View GitHub Profile
@e0da
e0da / README.md
Created January 27, 2023 17:48 — forked from dsample/README.md
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
@e0da
e0da / socket.rb
Created January 2, 2021 23:28 — forked from RickCarlino/socket.rb
Bi-directional TCP socket in Ruby
#Jeepers, this standard library has everything!
require 'socket'
server = TCPServer.new "127.0.0.1" , 4000
while connection = server.accept
Thread.new(connection) do |client|
while (client_input = client.gets.chomp)
@e0da
e0da / DellXPS15_9560_AHCI_RAID.md
Created September 4, 2019 04:32 — forked from chenxiaolong/DellXPS15_9560_AHCI_RAID.md
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:
@e0da
e0da / xterm-256color-italic.terminfo
Created May 9, 2018 18:35 — forked from sos4nt/xterm-256color-italic.terminfo
A xterm-256color based TERMINFO that adds the escape sequences for italic
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
# tic xterm-256color-italic.terminfo
#
# Usage:
#
# export TERM=xterm-256color-italic
#

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Solarized theme for pantheon-terminal
see http://ethanschoonover.com/solarized
"""
import posixpath
import sys
from gi.repository import Gio
# aptitude is incompatible with a terminal in solarized dark.
# So we need to tweak aptitude's color style.
# Put the following lines in `/etc/apt.conf` or `~/.aptitude/config`.
Aptitude::UI::Styles {
Default {
bg default;
};
DepBroken {
fg white;
@e0da
e0da / .Xdefaults
Created October 31, 2013 18:47 — forked from yevgenko/.Xdefaults
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
dan@app05:/nutricate/production/app$ git status
# On branch deploy
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: admin/config/email.yml
# modified: admin/config/environments/admin.rb
# modified: admin/config/initializers/recaptcha.rb
# modified: instance/init_scripts/admin
@e0da
e0da / query.sql
Created September 25, 2013 23:51
SELECT "message_images"."id" AS t0_r0,
"message_images"."name" AS t0_r1,
"message_images"."name_on_disk" AS t0_r2,
"message_images"."entity_id" AS t0_r3,
"message_images"."created_by" AS t0_r4,
"message_images"."create_method" AS t0_r5,
"message_images"."created_on" AS t0_r6,
"message_images"."modified_by" AS t0_r7,
"message_images"."updated_on" AS t0_r8,
"message_images"."activate_at" AS t0_r9,