Skip to content

Instantly share code, notes, and snippets.

View idreplacer.go
package config
import (
// idPatterns describes patterns of IDs in URLs. These patterns are matched
// against an entire URL. These patterns are used as given without any
public class DisconnectTest
private static final int SLEEP_AFTER_DISCONNECT = 2_000;
public static void main(String[] args) throws Exception
View comment-suppressor.php
* Plugin Name: Comment Suppressor
* Description: Hide comments for anonymous and “Subscriber” users.
* Version: 1.0.1
* Author: Samuel Coleman <>
* License: WTFPLv2
View Space Engineers
#! /bin/sh
# Configure an Ubuntu system for running Space Engineers. Flagrantly untested.
# Seriously, I haven't even run this once.
# TODO: Report progress to the web UI.
# TODO: Error checking/early failure.
# User data should contain:
MrDOS / modifyValidatorValue.js
Created Jul 25, 2019
The Daily WTF: Break my Validation
View modifyValidatorValue.js
modifyValidatorValue: function (fieldName, validatorKey, key, value) {
if (helper.isNullOrUndefined(fieldName)
|| helper.isNullOrUndefined(validatorKey)
|| helper.isNullOrUndefined(key)
|| helper.isNullOrUndefined(value)) {
// Iterate over fields
var field;
View mock.awk
# In retaliation to
# Usage:
# awk -v FS=';' -v OFS=';' -f mock.awk <mock.csv
# “NR” is the number of the record we're operating on; effectively a sequential
# counter. We don't want to filter on the first row, which is the header.
NR > 1 && $7 == "false" {
View whatpulse-equivs
Package: whatpulse
Section: misc
Priority: optional
Standards-Version: 3.9.2
Depends: libqtcore4, libqtwebkit4, libqt4-sql, libqt4-sql-sqlite, libqt4-script,
libssl1.0-dev, libpcap0.8, gksu
Description: Dummy package for WhatPulse dependencies.
MrDOS / packcode.cpp
Last active May 2, 2017
NetBurner packcode
View packcode.cpp
* Copyright 2005
* NetBurner, Inc.
* 5405 Morehouse Drive, Ste 200
* San Diego, CA 92121
* information available at:
* In addition to the rights retained by the authors, you may also use
* this code under the terms of the GNU public license.
View simple-wc.c
#include <stdio.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <inttypes.h>
#define BUF_SIZE (1048576 * 10)
int main(int argc, char *argv[])
MrDOS / csv-good.csv
Last active Feb 3, 2017
CSV Export is Awful in Excel for Mac 2016
View csv-good.csv
Col 1 Col 2
Let's call this "1" I don't believe you
2 This field contains a newline
3, alright Sacré bleu!