Skip to content

Instantly share code, notes, and snippets.

View raws's full-sized avatar
🥯
dabbling in pumpernickel

Ross Paffett raws

🥯
dabbling in pumpernickel
View GitHub Profile
@raws
raws / gist:1233539
Created September 21, 2011 22:45
Authenticate against ExpressionEngine >= 2.2.2 member data in Ruby
#!/usr/bin/env RBENV_VERSION=1.9.3-preview1 ruby
require "digest"
require "sequel"
module ExpressionEngine
module Authentication
ALGORITHMS = {
32 => Digest::MD5,
40 => Digest::SHA1,
@raws
raws / chopt.rb
Last active November 12, 2016 22:52 — forked from prokop75/gist:a1e141c10b828d03ae74aca3f06e06e4
Chopt make order ahead orders not reorderable
chopt_location_ids = [5652, 6397, 6646, 6647, 6648, 6650, 6651, 6652, 6653,
6654, 7169, 7170, 7453, 7454, 7624, 7625, 7626, 7627, 7628, 7629, 7630,
7631, 7632, 7633, 8015, 8482, 10153, 10619, 10620, 10823, 10824, 11457,
11560, 14504, 14505, 14820, 15323, 17342, 22070, 22074, 22100, 22101]
orders = Order.completed.where(location_id: chopt_location_ids,
reorderable: true)
# Iterate through all orders, mark as reorderable = false, print IDs
orders.find_each do |order|
@raws
raws / helipads.cpp
Last active August 31, 2016 00:21
Useful ArmA 3 debug console snippets
// Mark locations of nearby helipads
{
_marker = createMarkerLocal [(format ["helipad_%1", ([0, 1000] call BIS_fnc_randomInt)]), (position _x)];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "hd_dot";
_marker setMarkerColor "ColorRed";
} forEach (nearestObjects [player, {"Land_helipadEmpty_F"}, 250]);
@raws
raws / gist:756864
Created December 28, 2010 03:21
Deepest, darkest infobot secrets revealed

Factoid arguments

Arguments are referenced as part of the factoid name itself, and get turned into bits of regex when parsed.

<Raws> infobot, no, starspin $1 is <action> swallows $1 in a violent, ethereal whorl of galactic stardust!
<infobot> Raws: okay
<Raws> ~starspin Mr_Rabies
*infobot swallows Mr_Rabies in a violent, ethereal whorl of galactic stardust!

The literal value of the factoid can then be displayed by prefixing the name with cmd: and substituting (.*?) for your dollar-sign argument(s):

TJ's
----
0.25 lb tempeh
5.5 lb trail mix
0.25 lb chocolate-covered coffee beans
1.5 lb dehydrated veggies
0.5 lb jerky
Safeway
-------
> Treasure Island Warehouse Closing Sale and Burner Swap Meet
> Say hello to a good buy!
>
> What: Treasure Island Warehouse Sale and Burner Swap Meet
> When: Saturday May 28th & Sunday 29th from 10am - 4pm
> Where: East side of Building 180 (behind the “Winery”) - see link https://goo.gl/maps/T63wuv2kNQu
>
> Building 180 on Treasure Island has been home to some of Burning Man’s most inspiring Art Cars, sculptures, and imaginative creations over the last decade.
>
> Following our epic farewell party two weeks ago, we are hosting a sale and swap meet with a whole range of equipment and materials to make your next art, video, music, sculpture, or decor project complete.
@raws
raws / rpg.mediawiki
Last active April 6, 2016 08:14
Blolol RPG guide

Note: Check out https://github.com/blolol/rpg/wiki for up-to-date documentation!

Blolol RPG is a roleplaying game for lazy people. It's part of Wheaties, and takes place entirely in IRC. It's inspired by Idle RPG, which has been around since 2004. Idle RPG's own description sums up the game quite nicely:

The Idle RPG is just what it sounds like: an RPG in which the players idle. In addition to merely gaining levels, players can find items and battle other players. However, this is all done for you; you just idle. There are no set classes; you can name your character anything you like, and have its class be anything you like, as well.

Blolol RPG shares these core concepts with Idle RPG, but it also differs in some interesting ways. Read on to find out how to play!

Where to play

@raws
raws / dark
Created January 25, 2014 21:39
nytimes.com slideshow image load animations
data:image/gif;base64,R0lGODlhIAAgAMQAABISEjMzMxQUFCsrKy0tLTExMSIiIhYWFh4eHhoaGikpKRwcHBgYGC8vLycnJyAgICUlJRUVFRMTExkZGTAwMCYmJh8fHyQkJCwsLBsbGxcXFyoqKiMjIygoKB0dHS4uLiH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjFEMjM1OEQ1OEU2OURGMTE5RkI4QTQ4OURBRjgwMkZGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkUyOEQwRERDMjdBQzExRTNBNUY5QTZEMkY0RjJBNDBGIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkUyOEQwRE
@raws
raws / gist:8509976
Created January 19, 2014 19:41
Contents of /System/Library/LaunchDaemons/com.apple.metadata.mds.plist on my 2013 13" rMBP running 10.9.1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>POSIXSpawnType</key>
<string>Interactive</string>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.apple.metadata.mds</string>
@raws
raws / MainMenuPresenter.cs
Created December 29, 2013 21:01
Coherent UI bindings
[CoherentMethod("GetVersion")]
public string GetVersion() {
return "1.0.1";
}