Skip to content

Instantly share code, notes, and snippets.

View kthompson's full-sized avatar
😀

Kevin Thompson kthompson

😀
View GitHub Profile
@kthompson
kthompson / print_hex.asm
Last active August 15, 2022 15:52 — forked from jsutlovic/print_hex.asm
Assembly print hex
[org 0x7c00]
mov dx, 0x1fb7 ; Set the value we want to print to dx
call print_hex ; Print the hex value
jmp $ ; Hang once we're done
%include "print_string.asm"
; Prints the value of DX as hex.
print_hex:
{
"_links": {
"_first": "https://api.planet.com/v1/catalogs/grid-utm-25km/items/?_page=%3D%3D",
"_next": "https://api.planet.com/v1/catalogs/grid-utm-25km/items/?_page=",
"_prev": "https://api.planet.com/v1/catalogs/grid-utm-25km/items/?_page=",
"_self": "https://api.planet.com/v1/catalogs/grid-utm-25km/items/?_page="
},
"features": [
{
"_links": {
@kthompson
kthompson / Lulzbot TAZ 5 (0.5 nozzle).fff
Created March 1, 2017 03:44
Simplify3D settings for Lulzbot TAZ 5 w/ 0.5mm nozzle
<?xml version="1.0"?>
<profile name="Lulzbot TAZ 5 (0.5 nozzle)" version="2017-02-28 19:41:52" app="S3D-Software 3.1.1">
<baseProfile>LulzBot TAZ 5 Dual Extruder (0.5mm nozzle) (modified)</baseProfile>
<printMaterial>ABS Red</printMaterial>
<printQuality>Medium</printQuality>
<printExtruders>Default</printExtruders>
<extruder name="Extruder">
<toolheadNumber>0</toolheadNumber>
<diameter>0.5</diameter>
<autoWidth>1</autoWidth>
val announcements = List(
Announcement("crop_plan", "1", "create", JsObject()),
Announcement("crop_plan", "2", "update", JsObject()),
Announcement("crop_plan", "3", "index", JsObject()),
Announcement("crop_plan", "4", "destroy", JsObject()),
Announcement("field_event", "1", "create", JsObject()),
Announcement("field_event", "2", "update", JsObject()),
Announcement("field_event", "3", "index", JsObject()),
Announcement("field_event", "4", "destroy", JsObject())
)
def fix[A, B](f: (A => B) => (A => B)): A => B =
(t: A) => f(fix(f))(t)
val factorial = fix[Int, Int](fac => {
case 0 => 1
case x => x * fac(x-1)
})
factorial(5)
gulp build
[11:02:55] Using gulpfile E:\code\AppDev\BudgetBoyApp\gulpfile.js
[11:02:55] Starting 'build'...
[11:02:55] Starting 'unbundle'...
[11:02:55] 'unbundle' errored after 7.08 ms
[11:02:55] TypeError: needs a 'context' argument.
at readConfig (E:\code\AppDev\BudgetBoyApp\node_modules\aurelia-bundler\dist\config-serializer.js:25:6)
at getAppConfig (E:\code\AppDev\BudgetBoyApp\node_modules\aurelia-bundler\dist\config-serializer.js:37:16)
at removeBundles (E:\code\AppDev\BudgetBoyApp\node_modules\aurelia-bundler\dist\unbundle.js:50:51)
at Object.unbundle (E:\code\AppDev\BudgetBoyApp\node_modules\aurelia-bundler\dist\unbundle.js:44:16)
x: f
a: 'a'
b: 'b'
c: 'c'
d: 'd'
# modify Sidekiq::Debounce to use the first parameter of a Sidekiq
# job as the debounce key
Sidekiq::Debounce.class_eval do
def debounce_key
hash = Digest::MD5.hexdigest(@msg['args'].first)
@debounce_key ||= "sidekiq_debounce:#{@worker.name}:#{hash}"
end
end
@kthompson
kthompson / scoop_basic.cmd
Last active December 8, 2015 19:40
Basic windows install
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop install sudo
sudo scoop install 7zip git --global
scoop install curl grep sed less tail touch
scoop install python nodejs nuget
var box = this._activeCam.IsBoxCamera();
this.grpZoom.Visible = !box;
this.grpZoom.Enabled = !box;
this.grpHeaterDisplay.Visible = !box;
this.grpHeaterDisplay.Enabled = !box;
this.grpVolts_Optical.Visible = !box;
this.grpVolts_Optical.Enabled = !box;
this.lblLensTempName.Visible = !box;
this.lblLensTempC.Visible = !box;