Skip to content

Instantly share code, notes, and snippets.

😎
sup

Tommy rocktronica

😎
sup
Block or report user

Report or block rocktronica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View knobs.scad
// Size 4-40
screwDiameter = 2.8;
screwHeadDiameter = 5.5;
screwHeadHeight = 2.3;
insertDiameter = 4;
insertThreadedDiameter = 4.45;
insertHeight = 3.5;
standardPotShaftTopHeight = 8;
standardPotShaftTopDiameter = 6;
View upload_to_octoprint.sh
#!/bin/bash
{
filename="$1"
user="pi"
host="octopi.local"
destination="~/.octoprint/uploads"
bandwidth_limit="1000" # prevents stalling on large files; kbit/s
@rocktronica
rocktronica / easing-functions-demo.scad
Last active May 15, 2017
/content/animation-easing-functions.gif
View easing-functions-demo.scad
include <easing-functions.scad>;
function undulate(t) = abs((t - .5) * 2);
length = 5;
fullWidth = 200;
textSize = 5;
margin = length;
textGutter = length;
View responsive-iframes.js
$.fn.ready(function(){
$("iframe").each(function() {
var $iframe = $(this),
width = $iframe.attr("width") || $iframe.width(),
height = $iframe.attr("height") || $iframe.height();
var $wrapper = $("<div></div>")
.css({
"position": "relative",
View prusa.md

Big Lessons!

  • Bed maintenance
    • Wipe clean after almost everything -- including touching
    • Use adhesive when the print will take longer than ~30min
    • Symptoms: spaghetti, bunching
  • Extruder maintenance
    • Keep nozzle clean
      • Don't wipe with paper towel
      • Pull off debris with pliers
View slack-hex.js
var i = 16;
var sleep = 0;
while (i-- > 0) {
var iHex = i.toString(16);
var ii = 16;
while (ii-- > 0) {
(function() {
var iiHex = ii.toString(16);
var fullHex = iHex + iiHex + iHex + iiHex + iHex + iiHex;
View gist:5960e5e18e9b74497c25
(function(doc, undefined) {
var soundEffectStable = [
new Audio("/media/sounds/comical.wav"),
new Audio("/media/sounds/dirp.wav"),
new Audio("/media/sounds/whip-and-bonk.wav"),
];
for (var i = 0; i < 4; i++) {
soundEffectStable = soundEffectStable.concat(soundEffectStable);
}
View nasa_desktop.sh
#!/bin/bash
{
date_slug=$(date "+%y%m%d")
image_filename="$PWD/images/$date_slug.jpg"
cache_page_filename="$PWD/cache/ap$date_slug.html"
function download_page() {
if [ ! -f $cache_page_filename ]; then
curl -# -L http://apod.nasa.gov/apod/ap$date_slug.html \
View invite_to_review.md

Banners and modals

Banner CTAs can be largely navigational:

  • "Upload picture" -> /profile/services/SERVICE_ID/edit/profile-picture
  • "Describe youself" -> /profile/services/SERVICE_ID/edit/services
  • "Email review on my own" -> /profile/services/SERVICE_ID/edit/reviews

Two catches:

View separator.less
// <p>Before</p>
// <p class="separator">
// Or
// </p>
// <p>Before</p>
.separator {
text-align: center;
position: relative;
You can’t perform that action at this time.