Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View e0da's full-sized avatar

Justin Force e0da

View GitHub Profile
@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 / sql.rb
Created February 20, 2019 18:12
cur.execute(<<-'SQL'.gsub('%s', tablename))
INSERT INTO `%s`
SELECT cs.nodeid, dbs.name database, rels.name `table`,
reps.name `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
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
#
@e0da
e0da / iptorrents.css
Last active August 7, 2017 03:25
Custom styles for IPTorrents
/* https://gist.github.com/justinforce/4b15ff14b225f5b4d500be4ee49a8757 */
#iptStart .topRow {
padding-bottom: 0 !important;
}
#iptStart .banner {
background-image: none !important;
height: 57px !important;
}
// ==UserScript==
// @name Hide Hangouts in Inbox
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Justin Force
// @match https://inbox.google.com/*
// @grant none
// ==/UserScript==
@e0da
e0da / ascii_only.rb
Created January 29, 2016 00:58
Report non-ASCII characters in a file
#!/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'
puts
<!doctype html>
<body>
<script>
(function () {
'use strict';
var currentColor, colors, style, FORWARD, BACK;
FORWARD = 1;
default[:attr] = 'FOO'
# 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 / extend.rb
Last active December 30, 2015 13:29
module Helpers
def help
puts 'helpful!'
end
end
class Foo
def get_help
self.extend Helpers