Skip to content

Instantly share code, notes, and snippets.

@tofarley
tofarley / get_bgg_owned.py
Last active August 16, 2018 15:36
Get Game ID and Name from User's collection on BGG
#!/usr/bin/env python3
import requests
from lxml import objectify
# Need to check this output and ensure that the async processing has completed before continuing.
r = requests.get('https://boardgamegeek.com/xmlapi/collection/tofarley?own=1')
# Parse the xml. We need to remove the 'UTF-8' encoding specified in the xml or lxml will complain.
mygames = objectify.fromstring(r.text.replace('encoding="utf-8" ', ''))
G21;(metric values)
G90;(absolute positioning)
M82;(set extruder to absolute mode)
M107;(start with the fan off)
G28;(Home the printer)
G92 E0;(Reset the extruder to 0)
G0 Z5 E5 F500;(Move up and prime the nozzle)
G0 X-1 Z0;(Move outside the printable area)
G1 Y60 E8 F500;(Draw a priming/wiping line to the rear)
G1 X-1;(Move a little closer to the print area)
---
- name: nginx proxy
hosts: nginx_servers
roles:
- nginx_proxy
@tofarley
tofarley / gist:998616ae45c553f68ca5
Created May 16, 2015 23:14
flamenco server tests failing
EEEEEE.....INFO:root:Creating blender_path_win None [95/1841]
INFO:root:Creating render_settings_path_linux /home/brender/render
INFO:root:Creating render_settings_path_osx None
INFO:root:Creating render_settings_path_win None
INFO:root:Creating active_project None
INFO:root:Creating blender_path_linux /home/brender/blender
INFO:root:Creating blender_path_osx None
E
======================================================================
ERROR: test_job_create (__main__.ServerTestCase)
@tofarley
tofarley / gist:8285845
Last active October 13, 2016 14:04
My Blender render farm ansible playbook.
---
- name: Create render slaves on Rackspace Cloud
hosts: renderslaves
user: root
connection: local
gather_facts: False
tasks:
- name: Provision a set of instances
local_action:
module: rax
@tofarley
tofarley / gist:8279311
Created January 6, 2014 07:12
Does not copy public keys to every created server.
---
- name: Create render slaves on Rackspace Cloud
hosts: renderslaves
user: root
connection: local
gather_facts: False
tasks:
- name: Provision a set of instances
local_action:
module: rax
@tofarley
tofarley / gist:8276742
Last active January 2, 2016 08:29
Only performs post-processing actions on the first server of the 5 intended to be in the group. I suspect there is something wrong with the way I am adding to the group "slaves".
---
- name: Create render slaves on Rackspace Cloud
hosts: renderslaves
user: root
connection: local
gather_facts: False
tasks:
- name: Provision a set of instances
local_action:
module: rax
$cd "C:\Users\tofarley\Desktop\aperture_scout"
//$upaxis Y
$modelname "tofarley/apscout.mdl"
$model scout "head=zero.dmx" {
eyeball righteye "bip_head" -1.251646 75.814264 2.141014 "eyeball_r" 1.4 4 "pupil_r" 0.6
eyeball lefteye "bip_head" 1.251646 75.814264 2.141014 "eyeball_l" 1.4 -4 "pupil_l" 0.6
localvar %dummy_eyelid_flex
flexcontroller eyes range -45 45 eyes_updown
@tofarley
tofarley / gist:7908092
Created December 11, 2013 10:20
My current QC file to rebuild the Aperture Scout from Garry's Mod with an hwm head...
$cd "C:\Users\tofarley\Desktop\aperture_scout"
$modelname "player/hwm/scout.mdl"
$cdmaterials "models/player/scout/aperturescout/"
$model "scout" "scout_morphs_low.dmx.smd" {
flexfile "scout_morphs_high.vta" {
$include "standardflex_xsi.qci"
}
}
$model "hat" "hat_bodygroup.dmx.smd"
@tofarley
tofarley / gist:7868230
Created December 9, 2013 06:33
QC File for Aperture Scout...
$cd "C:\Users\tofarley\Desktop\aperture_scout\decompiled"
$modelname "apccpt/impro.mdl"
$model "scout" "scout_morphs_low.dmx.smd" {
flexfile "mdldecompiler_expressions.vta" {
flexpair "CloseLidLo" 1.0 frame 1
flexpair "CloseLidUp" 1.0 frame 2
flex "WQ" frame 3
flex "OO" frame 4
flex "MB" frame 5
flex "SH" frame 6