Skip to content

Instantly share code, notes, and snippets.

View RadicalZephyr's full-sized avatar

Zefira Shannon RadicalZephyr

View GitHub Profile
@RadicalZephyr
RadicalZephyr / gcode.lalrpop
Last active April 21, 2021 23:43
GCode parser built using LALRPOP
use std::str::FromStr;
use lalrpop_util::ParseError;
use crate::gcode::{GCode, Mnemonic};
use crate::parse::Error as GCodeError;
grammar;
extern {
[package]
name = "tokio-channel-test"
version = "0.1.0"
authors = ["Geoff Shannon"]
edition = "2018"
[dependencies]
futures-preview = { version = "=0.3.0-alpha.18", features = ["async-await", "compat", "io-compat", "nightly"] }
tokio = "0.2.0-alpha.2"
tokio-test = "0.2.0-alpha.2"
@RadicalZephyr
RadicalZephyr / command.rs
Last active February 3, 2019 10:44
Example syntax for mason-rs
use mason::generate_builder;
#[generate_builder(CommandBuilder)]
pub struct Command {
#[builder(entrypoint, into, required)]
program: String,
args: Vec<String>,
cwd: Option<String>,
@RadicalZephyr
RadicalZephyr / docker-compose@.service
Created October 10, 2017 02:48
Generic systemd service file for running service's with docker-compose
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
[Service]
Restart=always
WorkingDirectory=/etc/docker/compose/%i
@RadicalZephyr
RadicalZephyr / slack_emoji_liberator.js
Created January 27, 2017 08:19
Slack Emoji Liberator
// Download all the custom emoji your slack team have created!
// Start by going to the "Customize Emoji" screen for your Slack team.
// Open up a browser console and run the following JS
var pattern = new RegExp("https://emoji.slack-edge.com/.*?/([^/]+?)/[^/]+(\.png|jpg|gif)");
function link_text (url) {
var match = pattern.exec(url);
if (match) {
@RadicalZephyr
RadicalZephyr / img-separator.sh
Last active June 25, 2023 21:04
Copy image files from a folder and rename based on type.
#!/usr/bin/env bash
set -e
if [ $# -lt 1 ]
then
echo "You must enter the name of a folder."
exit 1
fi
@RadicalZephyr
RadicalZephyr / TimelineExtract.js
Created April 24, 2014 02:05
Extract the checkin links from a Fossil timeline page
// ==UserScript==
// @name Fossil Time Log
// @namespace http://www.zephyrizing.net/gmscripts
// @description Generate some time-logs from the fossil timeline page
// @include http://scm.ldc.cs.wwu.edu:8888/classfinder/timeline?n=20&y=ci
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js
// @version 1
// @grant none
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am radicalzephyr on github.
  • I am radicalzephyr (https://keybase.io/radicalzephyr) on keybase.
  • I have a public key whose fingerprint is F225 FDC5 C9B0 29F7 EFD0 2DCD 3585 34C6 11F0 56F5

To claim this, I am signing this object:

@RadicalZephyr
RadicalZephyr / parsetest.rb
Last active December 22, 2015 16:59
Show case a macruby bug with regex syntax
puts %r{hello}.match("hello")
brokenreg = %r{
hello #stuff happens
$ # end of line
}x
definition = %r{
^ # begin of line