Skip to content

Instantly share code, notes, and snippets.

View hikari-no-yume's full-sized avatar
🌟
trying to save beautiful things

hikari_no_yume hikari-no-yume

🌟
trying to save beautiful things
View GitHub Profile
diff --git a/bravo/plugins/build_hooks.py b/bravo/plugins/build_hooks.py
index 98e2bff..a6bec20 100644
--- a/bravo/plugins/build_hooks.py
+++ b/bravo/plugins/build_hooks.py
@@ -5,6 +5,7 @@ from bravo.blocks import blocks, items
from bravo.entity import Chest, Sign
from bravo.ibravo import IBuildHook
from bravo.utilities import split_coords
+from bravo.terrain import NormalTree
@hikari-no-yume
hikari-no-yume / automaton.diff
Created May 1, 2011 00:35
Add "loadblock_hooks = grow_saplings" to bravo.ini
diff --git a/bravo/ibravo.py b/bravo/ibravo.py
index 4364969..6881d45 100644
--- a/bravo/ibravo.py
+++ b/bravo/ibravo.py
@@ -400,8 +400,16 @@ class IAutomaton(IBravoPlugin):
processing on those blocks.
"""
- blocks = Attribute("""
- List of blocks which this automaton is interested in.
from zope.interface import implements
from bravo.blocks import blocks
from bravo.ibravo import IAutomaton
class GrowSaplings(object):
implements(IAutomaton)
blocks = [blocks["sapling"].slot]
from twisted.internet.protocol import Protocol
from bravo.location import Location
class ClassicServerProtocol(Protocol):
"""
The Minecraft Classic server protocol.
This class is mostly designed to be a skeleton for featureful clients. It
tries hard to not step on the toes of potential subclasses.
from Tkinter import *
class EasyBitcoin:
def __init__(self, master):
master.grid_propagate(False)
topframe = Frame(master, width=640)
topframe.pack(side=TOP)
title = Label(topframe, text="This should be a title")
@hikari-no-yume
hikari-no-yume / gg2interface.py
Created July 19, 2011 22:34
GG2 Forums Signature Rotation Service
from urllib.request import build_opener, HTTPCookieProcessor
import urllib.parse
from http.cookiejar import CookieJar
def htmlentencode(text):
result = ""
for i in text:
if ord(i) < 128:
result += i
@hikari-no-yume
hikari-no-yume / MatrixScan.ino
Created January 12, 2012 23:09
LED Matrix - letters with Arduino and Python :)
// from http://overcode.yak.net/12 converted using pngascii.py
char FONT_DATA[1024] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
<?php
$beginMark = '[[begin]]';
$endMark = '[[end]]';
if (file_exists('relationships.json')) {
$relations = json_decode(file_get_contents('relationships.json'), true);
} else {
$relations = [
$beginMark => [
'Propagandist'/* => 1*/
| Profiles | CREATE TABLE `Profiles` (
`ProfileID` int(11) NOT NULL AUTO_INCREMENT,
`ProfileName` varchar(18) DEFAULT NULL,
`DisplayName` varchar(255) NOT NULL,
`ProfileIMage` varchar(255) NOT NULL DEFAULT '/media/profileimages/ScoutBlue.png',
`RealName` varchar(255) DEFAULT NULL,
`Bio` text,
`Country` varchar(255) DEFAULT NULL,
`WebsiteURL` varchar(255) DEFAULT NULL,
`LastOnline` datetime NOT NULL,
function bsearch(list, value) {
var index1, index2;
if (list.length === 1) {
return list[0];
} else if (list.length === 0) {
return null;
}
index1 = 0;