Skip to content

Instantly share code, notes, and snippets.

View vltr's full-sized avatar
🤓
Being nerdy ...

Richard Kuesters vltr

🤓
Being nerdy ...
View GitHub Profile
@vltr
vltr / Configuration.h
Created September 21, 2020 13:26
Marlin 2.0.x + Ender 3 + BTT SKR Mini E3 2.0 + MicroSwiss all-metal hotend + Custom made Z level probe mount
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@vltr
vltr / ender3-cura-start-gcode.gcode
Created September 21, 2020 13:21
my ender 3 starting gcode
;; -----------------------------------------------
;; current gcode
;; old code, before updating the extruder
;; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
;; G90 ; absolute positioning
G28 ; Home all axes
;; G92 X-5.0 Y-10.0 ; set home offsets (from MS)
G91 X153.50 Y115.50
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
@vltr
vltr / test-quickest-subcls-w-wo-slots.py
Created December 3, 2018 14:54
subclass with and without slot benchmark
import timeit
setup_stmt = """
class TestCls:
def __init__(self, one=None, two=None):
self.one = one
self.two = two
@vltr
vltr / test_cidict_multidict.py
Last active June 27, 2018 17:20
Sanic CIDict vs multidict.CIMultiDict simple benchmark
"""A simple benchmark script between using CIDict from sanic/response.py and
aio-libs/multidict implementation.
Gist created as a comment annex for PR #1244 (channelcat/sanic)"""
import cProfile
import sys
try:
import multidict
@vltr
vltr / test-memory-time-consumption.py
Last active April 5, 2018 13:26
memory and time consumption of simple python data structures
# NOTES AT THE END OF THE FILE
import argparse
import binascii
import os
import sys
from collections import namedtuple
try:
import attr

Keybase proof

I hereby claim:

  • I am vltr on github.
  • I am vltr (https://keybase.io/vltr) on keybase.
  • I have a public key whose fingerprint is 06AF 5014 4E3A 2FFC 29CD BB4A 7F47 8036 372D 7FCB

To claim this, I am signing this object:

@vltr
vltr / make-a-background.js
Created November 18, 2016 12:22
quick generate a background for my desktop
// Usage: node save-as-png.js filename.png
var fs = require('fs');
var Trianglify = require('trianglify');
if (process.argv.length < 3) {
console.log('Please specify a filename');
console.log('Usage: node save-as-png.js filename.png');
return;
}
@vltr
vltr / amqp_snippet.py
Created January 16, 2016 11:02
A quickly snippet using spec 0.9 of AMQP with txamqp + txamqp_helpers
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from txamqp_helpers.amqp import AmqpFactory
from amqp_specs import spec_0_9_1
amqp = AmqpFactory(host='insert host here',
port=1234,
vhost='your virtual host',
@vltr
vltr / amqp_specs.py
Created January 16, 2016 10:58
0.8.x and 0.9.x AMQP specs "embed"
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
spec_0_8 = """<?xml version="1.0"?>
<!--
Copyright (c) 2009 AMQP Working Group.
All rights reserved.
@vltr
vltr / amqp.py
Created January 16, 2016 10:56
txamqp_helpers / amqp.py -- Update for AMQP 0.9.X
###
# amqp.py
# AMQPFactory based on txamqp.
#
# Dan Siemon <dan@coverfire.com>
# March 2010
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,