Skip to content

Instantly share code, notes, and snippets.

View Xe's full-sized avatar
😂
h

Xe Iaso Xe

😂
h
View GitHub Profile
@Xe
Xe / orig.lua
Last active December 19, 2017 07:10
Russian roulette script for Tetra
Command("ROULETTE", function(source) local rdm = math.floor(100000000 * math.random() % 6) if rdm == 2 then client.Kill(source, "ROULETTE: KILL: " .. source.Nick .. " " .. tostring(rdm)) return "BANG! " .. tostring(rdm) else return "click " .. tostring(rdm) end end)
@Xe
Xe / Dockerfile
Last active October 15, 2017 15:23
mage goroot leak proof of concept
FROM xena/alpine
RUN apk add --no-cache mage
COPY /proj /root/go/src/cetacean.club/proj
WORKDIR /root/go/src/cetacean.club/proj
RUN mage -l
type
🖋 = object
🍎 = object
🍍 = object
🍎🖋 = object
🍍🖋 = object
proc `$`(p: 🖋): string = "🖋 "
proc `$`(a: 🍎): string = "🍎 "
proc `$`(p: 🍍): string = "🍍 "
{
"swagger": "2.0",
"info": {
"title": "schema.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
package main
import (
"compress/gzip"
"encoding/csv"
"flag"
"log"
"os"
)
@Xe
Xe / main.go
Created November 2, 2016 18:44
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"time"
)
package main
import (
"errors"
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
//os global Good news all! We are glad to announce the official partnership between PonyChat and the Pusher and Shover robots! We hope to learn a lot from and share with them to make things better for everypony. Good stuff is on the way!
//os global send
WAIT 5 MINUTES
//os global Okay, the pusher robot apparently shoves around blind people, and the shover robot pushes bread down their throats. However, we're all okay thanks to them being here to protect us from the terrible secret of space.
//os global send
WAIT 5 MINUTES

General or Things PonyChat Can Fix

  • RFC 1459 (plus IRCv3 caps) gateway (allow existing IRC clients/bots to be seamlessly connect to Matrix instead of elemental-ircd)
    • Underway as Project Morpheus
    • Client scripts to use some of the newer features
    • Have it emulate unrealircd
  • Comprehensive migration documentation for people wanting to use the new thing
    • Blogposts!
  • How common irc-isms translate to Matrix-isms
from util import hook
import requests, re
@hook.command
def printerfact(inp, say=None):
r = requests.get('https://catfacts-api.appspot.com/api/facts?number=1')
fact = r.json()['facts'][0]
regex = re.compile(re.escape("cat"), re.IGNORECASE)
return regex.sub("printer", fact)