Skip to content

Instantly share code, notes, and snippets.

View zml2008's full-sized avatar
🌊
whoosh

zml zml2008

🌊
whoosh
View GitHub Profile
@zml2008
zml2008 / VkComputeSample.c
Created May 30, 2016 06:10 — forked from sheredom/VkComputeSample
A simple Vulkan compute sample
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
@Plugin(...)
class ExamplePlugin {
@Inject InheritableRoot worldConfig;
ObjectMappedInheritableRoot<MyConfig> mapped;
@Listener
public void enable(GameInitializationEvent event) {
mapped = worldConfig.mappedTo(TypeToken.of(MyConfig.class));
}
var gulp = require('gulp');
var shell = require('gulp-shell');
gulp.task('latex', function() {
return gulp.src('*.tex')
.pipe(shell(["pdflatex -interaction=nonstopmode <%= file.path %>"]).on('error', function(){}))
.pipe(gulp.dest('./'))
});
gulp.task('watch', function() {
@zml2008
zml2008 / pom.groovy
Created August 15, 2015 17:19
maven does groovy too
project {
modelVersion '4.0.0'
groupId 'ninja.leaping'
artifactId 'spongescript'
version '1.0-SNAPSHOT'
name 'SpongeScript'
description 'A one-line description of this Sponge plugin. Override this page by creating a file called index.md in src/site/markdown/'
url 'https://${ghUser}.github.io/${ghRepo}'
prerequisites {
maven '3.0.3'

Keybase proof

I hereby claim:

  • I am zml2008 on github.
  • I am zml_ (https://keybase.io/zml_) on keybase.
  • I have a public key whose fingerprint is 9EDA 46C5 E005 71CD 8735 AE44 1B08 1BE0 AAD3 3F9B

To claim this, I am signing this object:

@zml2008
zml2008 / cleaned-reddit.pex
Last active August 29, 2015 14:02
Potential new PEX configuration format
# Cleaned up version of the configuration posted on /r/admincraft
# This is the amount of cleanup that would occur when the configuration is saved
# A list of permissions, applying to the group Test
# (also, comments are preserved)
[permissions group=Test]
- pex.user.thing
- commandbook.teleport.*
# These options apply to the group admins in world_nether
@zml2008
zml2008 / gist:7283888
Last active December 27, 2015 06:49
much nickchange
[02/ 14:44:44] <narrowdoge> oooh
[02/ 14:44:51] * DDoS is now known as Doge
[02/ 14:44:58] <zml> *DDoge
[02/ 14:45:02] * Doge is now known as DDoS
[02/ 14:45:04] <narrowdoge> so that's who he is
[02/ 14:45:15] * DDoS is now known as DDoGe
[02/ 14:45:23] <narrowdoge> wow such name
[02/ 14:45:33] * You are now known as DogeML
[02/ 14:45:39] <Grinch> Oh lord.
[02/ 14:46:04] <narrowdoge> CONFORM!
@zml2008
zml2008 / concept.md
Created August 12, 2013 02:00
Directory-based permissions concept

Overview

Instead of sticking all permissions in one file (per world), each user is a folder containing files where each line is a permission specification, and files can be symlinks (to function as groups).

This is a lot harder to mess up than YAML

Sorting order is alphabetical with world-specific permissions taking priority.

Example Directory Structure

permissions/
@zml2008
zml2008 / setupbft.sh
Last active December 20, 2015 04:59
Binfmt Examples (these are all set for my home, will need to be modified for other users)
echo ":Testing:E::bft::$HOME/test.bft:" | sudo tee /proc/sys/fs/binfmt_misc/register
@zml2008
zml2008 / New.java
Last active December 17, 2015 15:29
Example of new argument parsing for /clear!
@CommandDescription(aliases = "clear", usage = "[player] [item] [data]", desc = "Clears the target's inventory", min = 0, max = 3)
@Permissible("vanilla.command.clear")
public void clear(CommandSource source, CommandArguments args) throws CommandException {
Player player = args.popPlayerOrMe("player", source);
Material filter = VanillaArgumentTypes.popMaterial("filter", args);
Integer data = args.popInteger("data");
PlayerInventory inv = player.get(PlayerInventory.class);
if (inv == null) {