Skip to content

Instantly share code, notes, and snippets.

View RedHatter's full-sized avatar

Ava Johnson RedHatter

View GitHub Profile
const path = require('path')
module.exports = {
entry: path.join(__dirname, 'public', 'scripts', 'display.js'),
output: {
path: path.join(__dirname, 'cache', 'scripts'),
publicPath: '/scripts/',
filename: 'display.js'
},
module: {
@RedHatter
RedHatter / fulltextarea.user.js
Created February 24, 2017 19:16
Displays textareas fullscreen in a lightbox.
// ==UserScript==
// @name Full Textarea
// @namespace http://idioticdev.com
// @description Displays textareas in a lightbox.
// @include *
// @version 1
// @grant none
// ==/UserScript==
let areas = document.getElementsByTagName('textarea')
if (areas.length < 1)
@RedHatter
RedHatter / Element.java
Last active September 3, 2016 17:45
A postfix calculator.
import java.util.Queue;
/**
* Base class for all postfix elements.
*/
public interface Element {
/**
* Resolves the element to a number pushing the result onto the stack.
*/
public void resolve (Queue<Double> stack);
@RedHatter
RedHatter / stylus.rb
Last active May 22, 2016 03:19 — forked from sentientwaffle/stylus_converter.rb
Stylus plugin for Jekyll
require 'shellwords'
module Jekyll
class StylusConverter < Converter
safe true
def matches(ext)
ext =~ /\.styl/i
end
// ==UserScript==
// @name Egg Napper
// @namespace idioticdev.com
// @include http*://dragcave.net/locations/*
// @grant none
// @version 1
// ==/UserScript==
var SCROLL = true;
var ONLY_RARES = false;
@RedHatter
RedHatter / sprouted-passwords.user.js
Last active August 13, 2016 17:10
Greasemonkey script that generates and auto fills passwords using the website's domain as the seed. http://idioticdev.com/sprouted-passwords.html
// ==UserScript==
// @name Sprouted Passwords
// @namespace http://idioticdev.com
// @description Generate and autofill passwords using that website's domain as the seed.
// @include *
// @version 1.3
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js
// @require http://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.2/seedrandom.min.js
// @grant GM_registerMenuCommand
// ==/UserScript==
@RedHatter
RedHatter / fork.py
Last active January 2, 2016 06:29
Attempt to completely fork from parent process.
#!/usr/bin/python
import time, os, sys
# do the UNIX double-fork magic
pid = os.fork()
if pid > 0:
# parent process, exit
sleep(5)
sys.exit(0)
@RedHatter
RedHatter / zshrc
Last active May 31, 2019 22:18
My brilliant zshrc!
##
#
# Cool things I made
# display-and-space
# Display command syntax from manfiles.
#
# spin-directory
# Loop through directory stack.
#
# Run previous command as root
@RedHatter
RedHatter / vala-cascade.patch
Last active December 30, 2015 20:29
A patch to the Vala and Genie compilers to add support for cascading member access. Includes vala unit tests. Recursive cascading now supported. Similar to described here: http://news.dartlang.org/2012/02/method-cascades-in-dart-posted-by-gilad.html
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bcf82e1..eb158d7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -112,6 +112,7 @@ TESTS = \
delegates/bug639751.vala \
delegates/bug659778.vala \
delegates/bug703804.vala \
+ objects/cascade.vala \
objects/chainup.vala \
@RedHatter
RedHatter / patch_ext
Last active December 30, 2015 15:38
Create a patch from 'original_directory' to 'patch_directory' of only the files with the extension 'ext'.
find original_directory patch_directory -type f ! -name '*.ext' -printf '%f\n' | diff -ru original_directory patch_directory -X - > project.patch