Skip to content

Instantly share code, notes, and snippets.

@greenarrow
greenarrow / spherical_translate.scad
Last active December 23, 2015 15:59
OpenSCAD Spherical Translate
/* http://en.wikipedia.org/wiki/Spherical_coordinate_system */
module spherical_translate(value)
{
radius = value[0];
inclination = value[1];
azimuth = value[2];
x = radius * sin(inclination) * cos(azimuth);
y = radius * sin(inclination) * sin(azimuth);
@greenarrow
greenarrow / torrentcontrol
Created October 24, 2010 00:15
torrentcontrol
#!/usr/bin/env python
__doc__ = """Simple script to start and stop all torrents in Transmission
1. Make sure you have installed transmission-remote
2. Enable web client in Transmission (allow only for 127.0.0.1, do not use authentication)
3. Set up cron to start and stop the torrents (optional). e.g.
30 2 * * * path_to_script/torrentcontrol start
0 8 * * * path_to_script/torrentcontrol stop