Skip to content

Instantly share code, notes, and snippets.

View rocktronica's full-sized avatar
😎
sup

Tommy rocktronica

😎
sup
View GitHub Profile

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
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;
(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);
}
#!/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 \

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:

// <p>Before</p>
// <p class="separator">
// Or
// </p>
// <p>Before</p>
.separator {
text-align: center;
position: relative;
@rocktronica
rocktronica / rotating-squares.less
Created July 21, 2014 18:20
rotating-squares.less
.square(@size) {
display: block;
height: @size;
width: @size;
line-height: @size;
text-align: center;
}
@desired-total-width: 100px;
# You'll need ImageMagick, bub.
for filename in *.jpg
do
start='Description: '
name=$(identify -verbose "$filename" \
| grep -oE "$start.*" \
| cut -c ${#start}- \
| sed -e 's/^[ \t]*//')
@rocktronica
rocktronica / signup.html
Created October 14, 2013 22:14
LESS and HTMl for arrowed progress nav
{% macro progress_nav_link(step_name, text) %}
<a href="{{ step_name }}" ng-class="{
'not-completed-or-current': !completedOrCurrent('{{ step_name }}')
}">
{{ text }}
</a>
{% endmacro %}
<div class="progress-nav">
{{ _self.progress_nav_link('services', 'Services')}}
.custom-recolumn(@when-default, @when-less-than-total-width, @first-column: false) {
.dynamic-column(@when-default, @first-column);
@media @less-than-total-width {
.dynamic-column(@when-less-than-total-width, @first-column);
}
@media @mobile {
.full-width-column();
}