std::set phoenix;
phoenix.key_comp();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REPL example bot for mineflayer | |
// | |
// Connects to server but doesn't have any built in logic. The terminal where | |
// it was started is now a REPL (Read-Eval-Print-Loop). Anything typed will be | |
// interpreted as javascript printed using util.inspect. Don't forget to try | |
// tab completion. These variables are exposed as local: | |
// | |
// var mineflayer = require('mineflayer'); | |
// var bot = mineflayer.createBot({ username: 'REPL' }); | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"//comment": "All metainfo files will be ORIGINAL_FILE.mcmeta. For example, textures/blocks/portal.png.mcmeta. The format is, of course, JSON.", | |
"animation": { | |
"//comment": "This block will be required for animated textures. It can be an empty block, but it will be needed to detect an animation.", | |
"frames": [ | |
1, | |
{"index": 2, "time": 4}, | |
3, | |
4 | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UserDict import IterableUserDict | |
import collections | |
__author__ = 'github.com/hangtwenty' | |
def tupperware(mapping): | |
""" Convert mappings to 'tupperwares' recursively. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
int girlfriend; | |
} holder; | |
typedef struct { | |
holder a; | |
} toplevel; | |
typedef struct { | |
int this; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/sayraw {"text":"Want to reset the current minigame? ", "extra": [{"text":"Click here!", "clickEvent":{"action":"run_command", "value":"/scoreboard players set minigame_resetting 1"}}]} | |
{ | |
"text": "Want to reset the current minigame? ", | |
"extra": [ | |
{ | |
"text": "Click here!", | |
"clickEvent": { | |
"action": "run_command", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Building static nginx for teh lulz | |
# | |
# basic dependencies | |
sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev | |
# download nginx and openssl | |
wget http://nginx.org/download/nginx-1.5.6.tar.gz | |
tar xf nginx-1.5.6.tar.gz; cd nginx-1.5.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From Minecraft Overviewer (https://github.com/overviewer/Minecraft-Overviewer) | |
# png-it.py script -- modified version which works with mapcrafter maps | |
""" | |
Outputs a huge PNG file using the tiles from a overviewer map. | |
""" | |
from optparse import OptionParser | |
from PIL import Image | |
from os.path import join, split, exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python 3 | |
import struct | |
import socketserver | |
from base64 import b64encode | |
from hashlib import sha1 | |
import email | |
class WebSocketsHandler(socketserver.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
OlderNewer