Skip to content

Instantly share code, notes, and snippets.

@TrainerGuy22
TrainerGuy22 / gist:9475805
Created March 10, 2014 22:25
Github Flat Theme for Stylish
// Theme for Github. Bye bye gradients! (this was made from scratch)
.header {
display: none !important;
}
.header,
.select-menu-header,
#readme span.name,
.file .meta,
#!/usr/bin/al
# This works for comments, so shebangs and stuff work.
# Dynamic if run via executable, but static if compiled to bytecode?
# Namespaces don't enforce package structure. If no namespace is specified, one will be created by package structure.
namespace test;
// This works for comments too.
// Anyway, semicolons are optional.
// Inside a namespace, you can divulge into the classes rather than adopt the entire namespace.
#!/usr/bin/al
namespace test;
import std.datatypes.{String, Integer, Float, Double};
import std.Process;
private saySomething(const something LetsDoSomethingCool?) String {
return generics(something?.something) + " Something else.";
}
reserved X? cast<X>(X object) {
switch(X instanceof <>) {
case String:
return "Woot.";
default:
return null;
}
}
Plugin 'org.directcode.idea' failed to initialize and will be disabled. Please restart IntelliJ IDEA.
com.intellij.diagnostic.PluginException: org/directcode/idea/StartupComponent : Unsupported major.minor version 52.0 [Plugin: org.directcode.idea]
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:408)
var NodeicusBot = require('./lib/bot.js'),
chalk = require('chalk'),
colors = require('irc-colors');
var config = require('./lib/config.js').loadConfig();
var BotInstance = new NodeicusBot(config.server.hostname, config.server.port, function() {
BotInstance.getSocket().write("NICK " + config.client.nickname + "\r\n");
BotInstance.getSocket().write("USER " + config.client.nickname + " 8 * :" + config.client.realname + "\r\n");
});
/* jslint node: true */
"use strict";
var net = require('net'),
chalk = require('chalk'),
events = require('events'),
colors = require('irc-colors'),
treestump = require('../../treestump');
function NodeicusBot(hostname, port, callback) {
var logger = treestump.Logger("nodeicus");
var stdout = treestump.Mirrors.stdout();
stdout.setFormat(chalk.yellow("{{time}} {{level}} ->") + " {{message}}");
logger.addMirror(stdout);
logger.info("Hello world!");
// Breeze. Utility function for instating/abstracting isolates.
Future breeze(Function func) {
ReceivePort port = new ReceivePort();
Future.wait([Isolate.spawn((SendPort port) {
func();
port.send("QUIT");
}, port.sendPort)]);
bool isReturned = false;
Future returned = new Future(() {
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.apache.commons.lang3.ArrayUtils;
import java.util.*;
public abstract class CraftingRecipeBuilder {