Skip to content

Instantly share code, notes, and snippets.

@kmobs
kmobs / frequencytester.md
Last active June 15, 2024 07:10
Frequency Tester

Frequency Testing

This will allow you to test a specific frequency that you hear when you do your resonance testing in Klipper and potentially track down where extra peaks are coming from. If something is rattling at a specific frequency, you can specify that frequency and feel around the printer until you track it down.

Code was adopted by zifnab from somewhere in Klipper.

Usage

You have to have [resonance_holder] in your printer.cfg.

The command is HOLD_RESONANCE AXIS=<axis> FREQ=int SECONDS=<seconds>

@ericsampson
ericsampson / ServiceWithOptionsExample.cs
Last active November 15, 2020 19:22
Configuration pattern and ConfigureServices
// I have a service that needs to be initialized with a FooOptions and then added to the DI container.
// I also want to have IOptions<FooOptions> in the DI container to allow injection in other methods.
// How should I write my AddFoo extension method to support this?
public void ConfigureServices(IServiceCollection services)
{
services.AddFoo(fooOptions =>
{
configuration.GetSection("FooOptions").Bind(fooOptions)
fooOptions.param = "override";
@MarcusFelling
MarcusFelling / VSTS_CreateReleasePullRequest.ps1
Last active September 9, 2021 13:01
Uses the VSTS REST API to create pull request
<#
.SYNOPSIS
Uses the VSTS REST API to create pull request
.DESCRIPTION
This script uses the VSTS REST API to create a Pull Request in the specified
repository, source and target branches. Intended to run via VSTS Build using a build step for each repository.
https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pull-requests
.NOTES
@cwensley
cwensley / MyValidationDialog.cs
Created February 2, 2016 21:23
Example of how to validate the input of controls on an Eto.Forms dialog.
using System;
using System.Collections.Generic;
using System.Linq;
using Eto.Forms;
using Eto.Drawing;
namespace MyValidationApp
{
// base validator that can be extended to do custom validation
public class ControlValidator

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@austinhyde
austinhyde / js-observables-binding.md
Last active August 16, 2023 18:19
Vanilla JavaScript Data Binding

Observables

You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:

var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }

console.log(getN()); // 5

setN(10);

http://www.stylusmagazine.com/articles/weekly_article/constructing-manchester.htm
"Or even New Order’s “Blue Monday,” a song that owes much to Kilburn and Williams’ development—a pulsing, breathing pop classic fashioned primarily from cold, artificial parts: a vocoder, an Oberheim DMX drum machine, a Moog Source synthesizer, and a homemade Powertran sequencer"
http://www.electricity-club.co.uk/html/int_morris.html
Everyone talks about Everything's Gone Green being a sequencer number but it wasn't really?
No, with Everything's Gone Green, you had a Moog Source doing a 1/16th pulse and the Quadra doing the "da-dah, da-da-dah". Then what you'd do is take the 'CV' out of the Quadra and take that into the Moog so that the Moog is playing a different rhythm but following the pitch of the other thing. That's what we used for Temptation as well.
STEPHEN MORRIS Photo by Glenn A Baker
So the track that eventually became Video 586 was your turning point into actually using a sequencer?
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@JerrySievert
JerrySievert / gist:3119325
Created July 16, 2012 00:08
Working Node.js on Raspberry Pi
These instructions should be deprecated at this point.
Start following https://github.com/TooTallNate/node/tree/pi for a more straightforward node installation on the pi.
----
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages