Skip to content

Instantly share code, notes, and snippets.

View datacoda's full-sized avatar

T. L. Chen datacoda

  • Nephila Graphic
  • Halifax, Canada
View GitHub Profile
@datacoda
datacoda / gist:9176714
Created February 23, 2014 20:23
Getting public addresses from chef node attributes.
node['network']['interfaces'].map { |i,iface| iface['addresses'].select { |j,addr| addr['scope']=='Global' }.keys }.flatten
@datacoda
datacoda / sublime
Last active August 29, 2015 13:56
Sublime cygwin bash
#!/bin/sh
OPTS=''
ARGS=`getopt nawhbv $*`
set -- $ARGS
for i
do
if [[ $i == \-* ]]
then
OPTS="$OPTS $i"
@datacoda
datacoda / shippable.yml
Last active August 29, 2015 14:13
Shippable and HipChat notifications
language: ruby
bundler_args: --without kitchen_vagrant
cache: true
env:
- secure: {{ENCRYPTED_ENVIRONMENT_VARS_FROM_UI}}
rvm:
- 2.0.0
script:
- bundle exec rake ci
notifications:
@datacoda
datacoda / ender3-gcode-default.txt
Created January 10, 2020 14:19
Default Ender 3 G-godes
; ## START
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
@datacoda
datacoda / ender3_custom_gcode.txt
Last active February 1, 2020 02:29
Ender 3 Start/End G-codes
; START
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
M117 Bed Probing