Skip to content

Instantly share code, notes, and snippets.

😂
h

Christine Dodrill Xe

😂
h
Block or report user

Report or block Xe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View log.txt
~/go/src/github.com/Xe/johaus:master? λ time GOOS=js GOARCH=wasm go1.12beta2 build -o johaus.wasm wasm_main.go
0.372 secs
~/go/src/github.com/Xe/johaus:master? λ time go_js_wam_exec johaus.wasm
parsed in 187.348ms
(ni'o ((ti melbi) (i (((la jo'aus) cu) (jimpe (le (gerna (be (le jbobau)))))))))
text_eof
├────NIhO["ni'o"]
└────paragraph
├──sentence
View howto-automate-discord-webhook-cron.md

How to Automate Discord Message Posting With Webhooks and Cron

Most Linux systems have cron installed to run programs at given intervals. An example usecase would be to install package updates every Monday at 9 am (keep the sysadmins awake!).

Discord lets us post things using webhooks. Combining this with cron lets us create automated message posting bots at arbitrary intervals.

The message posting script

Somewhere on disk, copy down the following script:

View another_mind_open.txt
Another Mind Open
There was a fire where smoke gathered
and danced like rivers without gravity
to the rattle of drums.
Sometimes I would look inside the smoke
but it curled away and covered itself
with a cloak so opaque I could only cry.
It became the mask of its consumption.
View language_of_innocence.txt
The Language of Innocence
When a river is frozen,
underneath remains a current.
When the sky is absent of color
beneath the globe another world comes to light.
When my heart is alone
somewhere another heart beats my name
in code that only paradise can hear.
@Xe
Xe / orig.lua
Last active Dec 19, 2017
Russian roulette script for Tetra
View orig.lua
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 Oct 15, 2017
mage goroot leak proof of concept
View Dockerfile
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
View ppap.nim
type
🖋 = object
🍎 = object
🍍 = object
🍎🖋 = object
🍍🖋 = object
proc `$`(p: 🖋): string = "🖋 "
proc `$`(a: 🍎): string = "🍎 "
proc `$`(p: 🍍): string = "🍍 "
View schema.swagger.json
{
"swagger": "2.0",
"info": {
"title": "schema.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
View main.go
package main
import (
"compress/gzip"
"encoding/csv"
"flag"
"log"
"os"
)
View main.go
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"time"
)
You can’t perform that action at this time.