Skip to content

Instantly share code, notes, and snippets.

@lattejed
lattejed / search_all_cargo_toml.sh
Created May 10, 2022 07:25
Rust: Concat all `Cargo.toml` files in a project into `less` so they can be searched
find . -name 'Cargo.toml' -exec cat {} + | less
@lattejed
lattejed / setup_rust_ubuntu_20.04.sh
Created July 8, 2021 17:13
Setup Rust on Ubuntu 20.04
# Setup Rust on Ubuntu 20.04
apt update
apt upgrade
apt install gcc-multilib pkg-config libssl-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
@lattejed
lattejed / mqa_coeffs.txt
Created March 11, 2021 08:27
MQA Filter Coefficients
The following 16 sets of filter coefficients are used when resampling
a double-rate (88.2 kHz or 96 kHz) signal by a factor of 2, 4, or 8.
These values are scaled for unity gain at DC.
filter 0
x2 x4 x8
----------------------------------------------------------------
0.003324560821
0.014566563070
0.060877442360 0.032937943935
@lattejed
lattejed / a.js
Last active September 26, 2019 14:45
alert('hi');
#!/usr/bin/bash
sudo echo
echo "Enter the following:"
echo "User - the user that runs the Tezos node"
echo "Protocol - the current protocol e.g., 004-Pt24m4xi"
echo "Signer key alias - e.g., my_signer_key"
echo
# Note: This is for the Ubunutu 18.04.2 x64 image available as an Azure VM
# provisioned via the command line and may not work for other images / OS versions.
# Warning: This script directy edits some configuration files that may
# render your OS unusable if there is an error. Use at your own risk.
apt-get update
read -p "Set password for user 'deploy' (recommended) [yN] " -n 1 -r
echo
set tabstop=2
set shiftwidth=2
set expandtab
set smarttab
set autoindent
set textwidth=79
filetype plugin indent on
syntax on
@lattejed
lattejed / All values.txt
Created February 8, 2019 06:23 — forked from endolith/All values.txt
f and Q values for implementing Bessel filter as second-order sections (and Bessel polynomials in Python)
Q for N =
1: --------------
2: 0.57735026919
3: -------------- 0.691046625825
4: 0.805538281842 0.521934581669
5: -------------- 0.916477373948 0.563535620851
6: 1.02331395383 0.611194546878 0.510317824749
7: -------------- 1.12625754198 0.660821389297 0.5323556979
8: 1.22566942541 0.710852074442 0.559609164796 0.505991069397
9: -------------- 1.32191158474 0.76061100441 0.589406099688 0.519708624045
@lattejed
lattejed / file1.txt
Last active August 10, 2017 16:52
gist
AwEpbsdt6p2FHX3ZwuiMYOPnOJKMV/A98NXgUiV8WWRqxxmhySrApdnvMsoEjMxx
vrWfZvlqKCx4kFinzLWZrpFsdlaZ3gwt/uWiusfvHuNGWm2Y0w6GQcU4Tt68IHQr
KVF86xTRnzy6yg0muILX+3QqCshtqBTf1J7XEnBHMCy5GqKvah0Lcnf2wF/daQBC
xQ41fpSBpk6s9hRGK1Lb5GByeUasjtjZT9cbu6XCXUcL5P2czUzz2tHV7dk7ZZqb
ixnHdIYZENXIfceaNvUFLSUyqaTtQVaw14frbR08mBNyjG87GH8x3AnnUk2hHz3m
mSg2cvUU+nVoH6gnj9K+OvRWZQghenOGC1N0F7S/LG7b1pizTlqvDcqo/knkT+yc
RRox9YHCUYZ05W2RxFKSKF/yZtbyempT0UtOMn+XFAdcQI6VF37enZyFG/FbQOv/
4WtTDMrRMfKWJLI8D+A0WudLFcnyEt1SmlmeyIUqYUjw/MdWEI8uPDwidRYZ/tkp
XjuhhuHHVNQHPqUg3FWk/bTIVMUSnlvwMtmAYPELldntt6ZWi7QWHIW6O4tzW1xM
L/uA34XVwhfUxLaWwnBPIV+W1m+6lA9JVtJn+XOlS1gGq+ljcaOS3l6sP0/A4DEN
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2'
once the app is installed, even if the app uses jQuery 1.9.1:
jQuery.fn.jquery => "1.4.2"
$.fn.jquery -> "1.4.2"
*/