This file contains 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
# HG changeset patch | |
# User schumann2k <schumann2k ]at[ googlemail [dot] com> | |
# Date 1302451499 -7200 | |
# Node ID 8b9db3a4df0184c66c40c11b20a500a39391f802 | |
# Parent 86ae6c959e53ec7ad6756d60fbe3e39d9b15da76 | |
Added support for specifying the type of a NbtList (crucial for exporting .schematic files). | |
diff -r 86ae6c959e53 -r 8b9db3a4df01 LibNbt.Test/NbtFileTest.cs | |
--- a/LibNbt.Test/NbtFileTest.cs Sat Sep 18 17:07:44 2010 -0500 | |
+++ b/LibNbt.Test/NbtFileTest.cs Sun Apr 10 18:04:59 2011 +0200 |
This file contains 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
#!/bin/bash | |
SESSION="survival" | |
BACKUPDIR="/home/mc/backups/$SESSION" | |
WORLDS="world world_nether" | |
# For debugging | |
#set -x | |
#trap read debug |
This file contains 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 os, sys, subprocess, shlex, argparse, multiprocessing | |
def dir(path): | |
if os.path.isdir(path): | |
return path | |
else: | |
raise argparse.ArgumentTypeError("%s is not a valid directory" % (path)) | |
def process_dir(path, dest): | |
files = os.listdir(path) |
This file contains 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
bool quit = false; | |
SDL_Event e; | |
Uint32 tick = SDL_GetTicks(), lastTick = tick; | |
while (!quit) { | |
SDL_SetRenderDrawColor(ren, 0, 0, 0, 255); | |
SDL_RenderClear(ren); | |
// Processing, drawing, advance time, etc... | |
while (SDL_PollEvent(&e)) { |
This file contains 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 PIL import Image | |
import sys, os, re | |
from os import path | |
transforms = ( | |
('FT', 90), ('BK', 270), ('LF', 180), ('RT', 0), ('UP', 0), ('DN', 180) | |
) | |
def usage(): |
This file contains 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
# Source: http://www.hakspek.com/security/updates-make-windows-7-and-8-spy-on-you-like-windows-10/ | |
# Discussion on HN: https://news.ycombinator.com/item?id=10110155 | |
KB2505438 | |
KB2670838 - Windows 7 Only (corrupts AERO and blurry fonts on some websites) | |
KB2952664 | |
KB2976978 - Windows 8 only | |
KB3021917 | |
KB3035583 | |
KB3075249 |
This file contains 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
#! /usr/bin/env python3 | |
import os, sys, re | |
from subprocess import call | |
from os.path import join | |
LOGDIR = '/var/log/nginx' | |
OUTDIR = '/home/htdocs/internal/stats/' | |
WEBALIZER_OPTS = [ | |
'/usr/local/bin/webalizer-RB30', # Binary |
This file contains 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
# -- parf of a class that handles all User API interactions -- | |
def upload_video(self, path, title): | |
import os | |
if not os.path.exists(path): | |
raise IOError("file not found", path) | |
info = os.stat(path) | |
size = info.st_size | |
fn = os.path.basename(path) |
This file contains 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
#! /bin/bash -e | |
IPT=`which iptables` | |
SUBNET="192.168.22.0/16" | |
IF_PUB="eth0" | |
IF_PRIV="virbr0" | |
VMS="FROXLOR GAMESERVER WINDOWS NYANCOIN" |
This file contains 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
<?php | |
define('CACHE_ENABLED', true); | |
define('CACHE_TTL', 60*60); // 1 minute | |
define('DEBUG', FALSE); | |
// NEEDS PATH_INFO env var !!! | |
// nginx: fastcgi_param PATH_INFO $fastcgi_path_info; | |
$fr = $_SERVER['PATH_INFO']; |
OlderNewer