Skip to content

Instantly share code, notes, and snippets.

View xarses's full-sized avatar

Andrew Woodward xarses

  • San Francisco, Bay Area, CA
View GitHub Profile
$ pip freeze
alabaster==0.7.9
alembic==0.8.10
ansible==2.2.1.0
appdirs==1.4.0
Babel==2.3.4
bindep==2.1.0
boto==2.45.0
cffi==1.9.1
cliff==2.4.0
@xarses
xarses / adjust-networks.py
Created October 3, 2016 15:46
Adjust networks in nailgun ignoring api (designed for 7.0, use at own risk)
from collections import defaultdict
from itertools import imap
from itertools import islice
from netaddr import IPAddress
from netaddr import IPNetwork
from netaddr import IPRange
import six
@xarses
xarses / build_gt_ores_for_enviromine.py
Created August 20, 2016 08:44
gregtech6 enviromine config generator
preamble = 'gregtech:gt.meta.ore'
editions = ['small', 'broken', 'normal']
materials = ['basalt',
'bedrock',
'blackgranite',
'default',
'endstone',
'gravel',
'marble',
'netherrack',
Copyright (c) 2016, Andrew Woodward (xarses)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
@xarses
xarses / turbine.lua
Created June 12, 2016 22:16
wind turbine excerpt
function getRotor(inv, source, dest)
-- X if we don't have a rotor, we don't care and just grab any
-- X if we aren't on the max tier we can upgrade if any are present
-- X if we aren't taking damage, then we should downgrade
-- X if we are on wood, and not taking damage, then we have no wind
-- if keep upgrading, and then the next cycle downgrades, we shoudn't upgrade
-- again for a bit
-- X we need to skip missing items to upgrade
-- we should update our status on the display
-- we need to keep track of the rotors health, even if we put it away
function poi.new(self, address, location, cache, parent)
obj = {address=address,
location=location,
cache=cache or {},
parent=parent or self.parent
}
setmetatable(obj,self)
self.__index = self
return obj
end
local sides = require('sides')
local facing = {index = 1}
--[[
sides = {north=2,
east=5,
south=3,
west=4}
--]]
function facing.roll(self, dist)
function set(screen)
local addr = screen.address or component.screen.address
return function (...)
gpu.bind(addr)
return gpu.set(...)
end
end
gpu1 = set(screen1)
gpu2 = set(screen2)
if [[ -n "$1" ]] ; then
export ISO_PATH=$1
else
export ISO_PATH=/home/andreww/iso/fuel-4.1-235-2014-03-05_07-31-01.iso
fi
if [[ -z "$ENV_NAME" ]] ; then
export ENV_NAME=xarses
fi
#!/bin/bash
DEST="../../openstack_tasks/examples/"
git review -d 283332
git checkout master
git branch -D bp/fuel-openstack-tasks
git checkout -b bp/fuel-openstack-tasks || exit
git checkout review/andrew_woodward/bp/fuel-openstack-tasks -- ../../../Puppetfile ../../openstack_tasks/Puppetfile ../../../update_modules.sh