Skip to content

Instantly share code, notes, and snippets.

View RX14's full-sized avatar

Stephanie Wilde-Hobbs RX14

View GitHub Profile
require "../flag.cr"
class ExecuteFlag < Blerp::CommandFlag
@name = :execute
@key = "-e"
@description = "EXECUTE SOMETHING"
def processor(parser, data)
command = data.has_key?(:opposite) ? "nothing" : "something"
output = MemoryIO.new
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f765e847e99, pid=8791, tid=140146380257024
#
# JRE version: Java(TM) SE Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode linux-amd64 compressed oops)
# Problematic frame:
radeon: mmap failed, errno: 12
# C [libc.so.6+0x90e99] __memcpy_sse2_unaligned+0x29
@RX14
RX14 / a.gradle
Last active December 17, 2015 17:03
import org.apache.tools.ant.filters.ReplaceTokens
if (!hasProperty("gradleDebug")) {
ext.gradleDebug = "false"
}
task replaceTokens(type: Copy) {
from 'src/main/java'
into 'build/replacedSrc'
filter(ReplaceTokens, tokens: [DEBUG: gradleDebug])
project.publishing {
repositories {
maven {
name "Illyohs"
url "http://mvn.rx14.co.uk/illyohs/"
credentials {
username = "illyohs"
password = "whatever"
}
}
@RX14
RX14 / spawn_bonus_chest.json
Last active October 19, 2015 17:59 — forked from Dinnerbone/spawn_bonus_chest.json
This is an example of the current spawn bonus chest loot table in Minecraft, in the (possibly) new loot table data format.
[
{
"item": "minecraft:stick",
"weight": 10,
"minecraft:set_count": {
"min": 1,
"max": 3
}
},
{
@RX14
RX14 / gamemanj-irctadv.cr
Last active September 20, 2015 14:39
CR-TCPServ
require "socket"
require "./gamemanj-irctadv/*"
serv = TCPServer.new(6667)
loop do
socket = serv.accept
spawn GameConnection.new(socket).run
end
[
{
"id": 1,
"comment": null,
"rating": null,
"created_at": "2015-09-07T15:46:50.904Z",
"edited_at": null,
"user": {
{
"id": 1,
"comment": null,
"rating": null,
"created_at": "2015-09-06T23:41:22.974Z",
"edited_at": null,
"user": {
"id": 1
execute %(
CREATE TABLE "users" (
"id" blob(16) PRIMARY KEY NOT NULL,
"username" varchar(16) UNIQUE
);
).squish
execute %(
CREATE TABLE "content" (
"sha1" blob(20) PRIMARY KEY NOT NULL,
CREATE TABLE "content" (
"sha1" blob(20) PRIMARY KEY NOT NULL,
"title" text,
"description" text,
"type" varchar(20),
"user_id" integer
);
CREATE TABLE "users" (
"id" blob(16) PRIMARY KEY NOT NULL,