Skip to content

Instantly share code, notes, and snippets.

View robbintt's full-sized avatar
🎯
Focusing

Trent Robbins robbintt

🎯
Focusing
  • San Francisco, CA
View GitHub Profile
@robbintt
robbintt / scad-clj-cubes.clj
Last active December 30, 2017 01:03
scad-clj demo
;; this example could go a lot of different directions
;; you could bind the difference between the min cube size and max cube size to an interval and extrude N objects over the distance between 0 and PI.
;; lots of other cool parametric things are possible before the code gets translated.
;; bring primitives into namespace or whatever
(ns scad-demo.core
(:use [scad-clj.scad])
(:use [scad-clj.model]))
;; make primitives
@robbintt
robbintt / drone_chassis.scad
Created November 6, 2017 07:20
drone_chassis_openscad
c_diam = 6.9;
c_rad = c_diam/2;
// this comes from the projection of the length
// of the rectangle onto the axis (the rectangle's
// corner is on the origin and it is at 45 deg
// so follows: 2a^2 = c^2 which reduces to sqrt(2)*a = c
// final form is a=c/sqrt(2)
l1_projected = 107.9/sqrt(2);
@robbintt
robbintt / drone_chassis_svg_draft_20171105_2049
Created November 6, 2017 05:07
drone chassis draft 20171105_2049
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="89" height="89" viewBox="-12 -89 89 89" xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
<path d="
M 76.2968,-11.9501 L 44.1234,-44.1234 L 76.2968,-76.2968 L 64.3467,-88.2469 L 32.1734,-56.0735 L 0,-88.2469
L -11.9501,-76.2968 L 20.2233,-44.1235 L -11.9501,-11.9501 L 0,-0 L 32.1734,-32.1734 L 64.3467,-0
z
M -2.06749,-73.5349 L -3.23245,-75.0912 L -3.37114,-77.0302 L -2.4395,-78.7363 L -0.733337,-79.668 L 1.20566,-79.5293
L 2.76187,-78.3643 L 3.44121,-76.5429 L 3.02798,-74.6434 L 1.65341,-73.2688 L -0.246109,-72.8556 z
@robbintt
robbintt / drone_chassis_draft_20171105_2049
Created November 6, 2017 04:50
drone chassis draft 20171105_2049
0
SECTION
2
BLOCKS
0
ENDSEC
0
SECTION
2
ENTITIES
@robbintt
robbintt / post-save-encrypt-hook
Created June 6, 2017 18:03
Zephyr / zv wrote this after save encrypt hook for encrypting stuff
;; Zephyr / zv wrote this after save encrypt hook for encrypting stuff
(defun zv/encrypt-secrets ()
"Encrypt this file if it is in one of our `dirs-to-encrypt'"
(require 'epa-mail)
(let* ((zv-dotfiles (expand-file-name "~/Development/dotfilez/"))
(files-to-encrypt (list (expand-file-name "~/.authinfo")))
(dirs-to-encrypt (list (expand-file-name "~/.gnupg")
(expand-file-name (concat org-directory "/"))
(concat zv-dotfiles "gnupg/")
@robbintt
robbintt / lockpick-template-taper-thintip.scad
Last active June 5, 2017 05:29
A simple lockpick, untested
translate([0,4])
{
translate([-20,0])
{
square(size=[40,8], center=true);
}
translate([0,0])
{
circle(r=4);
# run with "$ irssi --config=~/path/to/this/file"
# the username is listed on 3 lines, all one after another... change from "robbintt"
# the channels are a little below the top, add one line per channel, you can uncomment lines
# make sure the last channel line doesn't have a comma at the end though (as it is now)
# guide for generating and using an SSL cert:
# https://wiki.archlinux.org/index.php/irssi#Configuration
servers = (
{
address = "chat.freenode.net";
@robbintt
robbintt / kr-errata-2nd-edition.txt
Created March 11, 2017 19:48 — forked from ttilley/kr-errata-2nd-edition.txt
Errata for The C Programming Language, Second Edition
Errata for The C Programming Language, Second Edition
This lists all known errors in The C Programming Language, Second Edition, by Brian Kernighan and Dennis Ritchie (Prentice-Hall, 1988).
The pagination of the book has changed only in minor ways across printings of the English-language edition. These errata now include section numbers, which are more likely to be preserved across translations. This might help identify errors that survive into translated editions.
Changes between first and second printing:
The first printing of the book was made before the Standard was finalized; these copies say "Based on Draft-Proposed ANSI C" on the front cover. All subsequent printings are identified by a large red ``ANSI C'' on the right center of the cover. Fortunately, the changes are minor; some repair our bugs, a few account for last-minute changes in the draft standard. These changes were made so early that they probably do not apply to you.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.