Skip to content

Instantly share code, notes, and snippets.

View blixt's full-sized avatar
🗺️
Exploring

Blixt blixt

🗺️
Exploring
View GitHub Profile
@blixt
blixt / gist:999134
Created May 30, 2011 16:40
Hello World
print("Hello World!")
@blixt
blixt / gist:1029532
Created June 16, 2011 15:42
Simple bin() function
def bin(i):
s = ''
while i:
s = str(i & 1) + s
i >>= 1
return '0b' + s
@blixt
blixt / blixt.go
Created August 3, 2011 21:14
Gogogogo!
package main
import "fmt"
type Person struct {
name string
age int
}
func (person *Person) Present() {
@blixt
blixt / waiter.js
Created October 10, 2012 22:33
Waiters (promises/deferreds/futures)
function Waiter(context) {
if (context) { this.context = context; }
}
Waiter.prototype.failed = function (cb) {
if (this.result) {
if (!this.success) { cb.apply(this.context || this, this.result); }
} else {
if (!this.failedCbs) { this.failedCbs = []; }
this.failedCbs.push(cb);
This file has been truncated, but you can view the full file.
# WorldMetadata
{u'adjustPlayerStart': True,
u'centralStructure': {u'backgroundBlocks': [],
u'backgroundOverlays': [],
u'flaggedBlocks': {},
u'foregroundBlocks': [],
u'foregroundOverlays': [],
u'objects': []},
u'dungeonIdMap': [[0, u'avianairship']],
u'planet': {u'active': True,
worldTemplate = {u'templateData': {u'detachedBiomeCount': 1, u'blendSize': 60.0, u'undergroundDetachedBiomeCaveFactor': 1.0, u'surfaceWeathers': [[1.0, {u'weatherNoises': [], u'name': u'clear', u'maximumWind': 0.0, u'lightningFrequency': 0.0, u'projectiles': [], u'particles': [], u'duration': [40.0, 100.0]}]], u'surfaceLevel': 600.0, u'primaryBiomeHueShift': -135.0, u'biomes': [{u'caveLiquidType': 4, u'surfacePlaceables': {u'grassModDensity': 0.8999999761581421, u'grassMod': 1, u'itemDistributions': [{u'modulusDistortion': {u'octaves': 2, u'beta': 2.0, u'bias': 8.0, u'frequency': 0.0833333358168602, u'gain': 2.0, u'amplitude': 4.0, u'offset': 1.0, u'alpha': 2.0, u'type': u'perlin', u'seed': 8109457383253712471L}, u'densityFunction': {u'octaves': 2, u'beta': 2.0, u'bias': -0.4000000059604645, u'frequency': 0.25, u'gain': 2.0, u'amplitude': 1.0, u'offset': 1.0, u'alpha': 2.0, u'type': u'perlin', u'seed': -1522463489702541583}, u'blockProbability': 5524939.0, u'blockSeed': -5704846321216458336L, u'priority': 1.0
open File(identifier="World2", path="SB/universe/alpha_-7529506_18243910_-21358832_9_2.world")
worldTemplate = {u'active': True,
u'celestialParameters': {u'coordinate': {u'location': [-7529505,
18243910,
-21358831],
u'planet': 9,
u'satellite': 2,
u'sector': u'alpha'},
u'name': u'Alpha Kappa Psc 5523 V a',
World size: 125 by 125 regions
Spawn point region: 0, 20
Outputting region: 0, 20
[
[
"PlantEntity",
1,
{
"ceiling": false,
@blixt
blixt / playerQuests.json
Created February 21, 2014 18:32
playerQuests.db, random key data
{
"status": "completed",
"completionText": "Well done! Using the crafting table will give you access to a wide range of new recipes. Collecting fuel and visiting a range of planets is the best way to find resources.",
"questId": "5d6946dcae9993ac36d7ea407bbdf81d",
"rewards": [
{
"count": 1,
"data": {},
"name": "woodencraftingtable1"
}
@blixt
blixt / universe.chunks.json
Created February 21, 2014 23:22
Random key from universe.chunks
[
"CelestialChunk",
1,
{
"systemObjects": [
[
[
7745997,
-57571756,
9884563