Skip to content

Instantly share code, notes, and snippets.

View thoferon's full-sized avatar

Tom Feron thoferon

View GitHub Profile
@jhaddix
jhaddix / all.txt
Created January 19, 2019 04:35 — forked from orangetw/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
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:
@thoferon
thoferon / weighted_avg.sql
Last active August 29, 2015 14:23
Aggregate function weighted_avg for PostgreSQL
CREATE TYPE _weighted_avg_fraction
AS (num double precision, denom double precision);
CREATE OR REPLACE FUNCTION _weighted_avg_step (acc _weighted_avg_fraction,
val anyelement, pond anyelement) RETURNS _weighted_avg_fraction AS $$
BEGIN
RETURN (acc.num + val * pond, acc.denom + pond);
END;
$$ LANGUAGE plpgsql;