Skip to content

Instantly share code, notes, and snippets.

Justin Force justinforce

Block or report user

Report or block justinforce

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
justinforce /
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)
justinforce / 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
justinforce / 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}
justinforce / 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;
View hideHangoutsInInbox.js
// ==UserScript==
// @name Hide Hangouts in Inbox
// @namespace
// @version 0.1
// @description try to take over the world!
// @author Justin Force
// @match*
// @grant none
// ==/UserScript==
justinforce / ascii_only.rb
Created Jan 29, 2016
Report non-ASCII characters in a file
View ascii_only.rb
#!/usr/bin/env ruby
# x starts at 0 because we increment x BEFORE checking the character.
# y starts at 1 because we only increment it when we hit a newline.
x, y = 0, 1
puts 'Positions are 1-indexed, NOT 0-indexed.'
puts 'i.e. The first character in the file is at position 1:1'
View concatenate-vs-join.rb
require 'benchmark/ips'
There's no beginning to this story. A bookshelf sinks into the sand. And a
language learned, a forgotten term, is studied once again. It's a shocking
bit of footage viewed from a shitty TV screen. Just squint at it, just snowy
static to make out the meaning. And keep on stretching the antenna hoping that
it will come clear. We need some reception, a higher message. Just tell us
what to fear 'cause I don't know what tomorrow brings. It's alive with such
possibility. All I know is I feel better when I sing.
View Fireworks!.markdown


You can click and drag then release to fling them, or press F for a fireworks show. Pressing any key will detonate all currently visible fireworks. There's a commented bit that activates the game when the Konami code is entered on the keyboard.

A Pen by Justin Force on CodePen.


View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

You can’t perform that action at this time.