Skip to content

Instantly share code, notes, and snippets.

View natewalck's full-sized avatar

Nate Walck natewalck

View GitHub Profile
@natewalck
natewalck / quarantine_demo.py
Created February 24, 2023 00:02 — forked from gregneagle/quarantine_demo.py
Using Apple's quarantine API from PyObjC
#!/usr/local/munki/munki-python
'''Demo only. Needs more robust error checking and handling'''
import os
from Foundation import NSURL, NSURLQuarantinePropertiesKey
def getQuarantineAttribute(pathname):
'''Returns a dict contaning quarantine info for pathname or None'''
@natewalck
natewalck / boot.sh
Created June 10, 2021 17:44 — forked from Jip-Hop/boot.sh
Using Docker on TrueNAS SCALE (no Kubernetes)
#!/usr/bin/env bash
# Using Docker on TrueNAS SCALE (no Kubernetes)
#
# Don't setup Apps via the TrueNAS Web GUI (don't choose a pool for Apps when asked)
# Make a dedicated docker dataset on one of your data pools
# Store this script somewhere else on your pool (not in the Docker dataset)
# Make a daeomon.json file in the same directory with the following contents:
# {"data-root": "/mnt/path/to/desired/docker/dataset/", "exec-opts": ["native.cgroupdriver=cgroupfs"]}
# Then schedule this script to start via System Settings -> Advanced -> Init/Shutdown Scripts -> Add:
@natewalck
natewalck / ducky.md
Created June 24, 2020 12:20 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

Keybase proof

I hereby claim:

  • I am natewalck on github.
  • I am natewalck (https://keybase.io/natewalck) on keybase.
  • I have a public key ASBNrIT_mMYpOE0MRdEEFoivFWkEQ7Ojb6U7aXhJnfA3Owo

To claim this, I am signing this object:

M584 X0 Y1 Z5:6:7 E3:4:8:9 ; Map Z to drivers 5, 6, 7. Define unused drivers 3,4,8 and 9 as extruders
M569 P0 S0 ; Drive 0 goes backwards (change to S1 to reverse it) X stepper
M569 P1 S1 ; Drive 1 goes forwards Y Stepper
M569 P2 S1 ; Drive 2 goes forwards Unused
M569 P3 S1 ; Drive 3 goes forwards Extruder
M569 P4 S1 ; Drive 4 goes forwards Extruder (unused)
M569 P5 S0 ; Drive 5 goes backwards Front Left Z
M569 P6 S0 ; Drive 6 goes backwards Rear Left Z
M569 P7 S0 ; Drive 7 goes backwards Right Z
@natewalck
natewalck / config.g
Created November 22, 2018 20:06
300ZL
; Configuration file for Nate's RailCore II
; Communication and general
M111 S0 ; Debug off
M550 PRailCore300ZL ; Machine name and Netbios name (can be anything you like)
;M551 Pmyrap ; Machine password (used for FTP)
;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xEF ; MAC Address
; Wifi Networking
M552 S1 ; Enable WiFi
3:44:02 PM
G32
Leadscrew adjustments made: -0.002 -0.023 -0.001, points used 3, deviation before 0.013 after 0.000
3:43:16 PM
G32
Leadscrew adjustments made: -0.001 0.022 -0.003, points used 3, deviation before 0.012 after 0.000
3:42:34 PM
G32
Leadscrew adjustments made: 0.118 0.063 0.011, points used 3, deviation before 0.070 after 0.000
3:42:08 PM

Test Files

sintel_4k.mov - QmWntgau1qWJh7hos91e6CqEzSWfaSn7permky8A3WJEnS Sintel.2010.1080p.mkv - QmUwZFGPptdF5ZG58EdozjDSXYugPsxe1MwPZFQ4vZmAsb Sintel.2010.720p.mkv - QmcdSfr63CHZ3sJkubrozeRmT4bo2DqpD8DKPFfhNby4FB

5.4gb test file - sintel_4k.mov

QmWntgau1qWJh7hos91e6CqEzSWfaSn7permky8A3WJEnS

; TazStiffBlack Configuration G-Codes
; General Preferences
M111 S0 ; Debug off
G21 ; Work in millimetres
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M555 P2 ; Set firmware compatibility to look like Marlin
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X365 Y240 Z147.5 S0 ; Set axis maxima
Generated at 2017-04-11 12:43:16 -0400
Chef::Exceptions::FileNotFound: remote_directory[/tmp/rd_test] (rd_test::default line 1) had an error: Chef::Exceptions::FileNotFound: cookbook rd_test has no directory files/default/some/folder
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/cookbook_version.rb:319:in `relative_filenames_in_preferred_directory'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/provider/remote_directory.rb:161:in `files_to_transfer'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/provider/remote_directory.rb:67:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/provider.rb:171:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/resource.rb:591:in `run_action'
/etc/chef/local-mode-cache/cache/cookbooks/rd_test/recipes/default.rb:11:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.113/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedde