summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3d/pawn.scad48
-rw-r--r--breakds/shell.nix14
2 files changed, 62 insertions, 0 deletions
diff --git a/3d/pawn.scad b/3d/pawn.scad
new file mode 100644
index 0000000..0c581cc
--- /dev/null
+++ b/3d/pawn.scad
@@ -0,0 +1,48 @@
+$fa = 1;
+$fn = 0;
+$fs = 1;
+
+module smooth_cylinder() {
+ rotate_extrude(angle=90)
+ translate([-10, 10, 0])
+ rotate([180, 0, 0])
+ difference() {
+ square(10);
+ circle(10);
+ }
+}
+
+d1 = 6;
+d2 = 10;
+h1 = 2;
+h2 = h1 + d1;
+h3 = h2 + d2;
+h4 = h3 + 5;
+
+cylinder(h=1.0, r=10);
+
+translate([0, 0, 1.0]) {
+ scale([1.0, 1.0, 0.2])
+ difference() {
+ sphere(10);
+ translate([0,0,-10]) cylinder(h=10, r=10);
+ }
+}
+
+translate([0, 0, h1]) {
+ cylinder(h=d1, r1=8, r2=6);
+}
+
+translate([0, 0, h2]) {
+ cylinder(h=d2, r1=4, r2=3);
+}
+echo(h2);
+
+translate([0, 0, h3]) {
+ scale([1.0, 1.0, 0.16]) sphere(6);
+}
+
+translate([0, 0, h4]) {
+ sphere(5);
+}
+
diff --git a/breakds/shell.nix b/breakds/shell.nix
new file mode 100644
index 0000000..af8666d
--- /dev/null
+++ b/breakds/shell.nix
@@ -0,0 +1,14 @@
+with import <nixpkgs> {};
+
+stdenv.mkDerivation rec {
+ name = "my-environment";
+ buildInputs = [
+ (writeShellScriptBin "hostname" ''
+ if [[ $# -eq 1 && $1 == "-l" ]]; then
+ echo "special case: $(${pkgs.nettools}/bin/hostname -i)"
+ else
+ ${pkgs.nettools}/bin/hostname "$@"
+ fi
+ '')
+ ];
+}