Skip to content

Instantly share code, notes, and snippets.

@bion
bion / daw.sh
Last active February 25, 2024 06:23
Linux audio work environment - supercollider in emacs routed to REAPER via jackd
#! /usr/bin/env bash
set -e
set -m
set +x
output_device="PCH"
if cat /proc/asound/cards | grep -q Scarlett; then
output_device="USB"
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
require "rubygems"
require "twitter"
# get these from apps.twitter.com
CONSUMER_KEY = "foo"
CONSUMER_SECRET = "bar"
OAUTH_TOKEN = "blee"
OAUTH_TOKEN_SECRET = "baz"
TWITTER_USER = "your_username" # needs to be the one associated with keys above
var am = "data:image/jpeg;base64,/9j/4aaqskzjrgabaqaasabiaad/4qcarxhpzgaatu0akgaaaagabqesaamaaaabaaeaaaeaaauaaaabaaaasgebaauaaaabaaaaugeoaamaaaabaaiaaidpaaqaaaabaaaawgaaaaaaaabiaaaaaqaaaegaaaabaakgagaeaaaaaqaaaeqgawaeaaaaaqaaabqaaaaa/+0aofbob3rvc2hvccazljaaoejjtqqeaaaaaaaaoejjtqqlaaaaaaaq1b2m2y8asgtpgamy7phcfv/idohjq0nfufjprklmrqabaqaadnhhchbsahaaag1udhjsr0igwflaiafhaaeafwawaamaigfjc3bbufbmaaaaaefquewaaaaaaaaaaaaaaaaaaaaaaad21gabaaaaanmtyxbwbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaewrlc2maaafqaaaaymrzy20aaag0aaabvmnwcnqaaan0aaaai3d0chqaaaoyaaaafhjywvoaaaosaaaafgdywvoaaapaaaaafgjywvoaaapuaaaafhjuukmaaapoaaaidgfhcmcaaav0aaaaihzjz3qaaawuaaaamg5kaw4aaaxeaaaapmnoywqaaayeaaaalg1tb2qaaaywaaaakgjuukmaaapoaaaidgduukmaaapoaaaidgfhymcaaav0aaaaigfhz2caaav0aaaaigrlc2maaaaaaaaacerpc3bsyxkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabtbhvjaaaaaaaaaciaaaamahjiugaaabyaaagoa29lugaaabyaaagobmjotwaaabyaaagoawqaaaaaabyaaagoahvivqaaabyaaagoy3ndwga

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@0XDE57
0XDE57 / config.md
Last active June 29, 2024 13:22
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@dbalatero
dbalatero / 00_README.md
Last active March 23, 2022 17:04
This is an example of how I combine interaction/service classes with Wisper event broadcasting inside Rails.

This is an example of how I combine interaction/service classes with Wisper event broadcasting in Rails.

In this example, I show a UsersController#create API, a corresponding service object, and all the test code/listeners to make it all happen.

The outcome is:

  • Concepts in your system ("Signing up a user", "Creating an order") have a single entry point in your codebase, vs. making raw ActiveRecord calls to object.save in dozens of places.
  • Since your concept has one entry point (the service class), you can easily grep for usage of it.
  • Stupid easy to attach listeners to the service class
  • All event listeners are very small and easily unit tested
@Engelberg
Engelberg / empty.md
Last active August 29, 2015 14:18
Empty sequences

As we've seen, seq is the mechanism in Clojure for converting a collection into something that responds to first and rest, so that we can traverse it as we would a linked list. Sequences automatically print at the REPL like a list.

=> (seq '(1 2 3 4))
(1 2 3 4)
=> (seq [1 2 3 4])
(1 2 3 4)
=> (seq #{1 2 3 4})
(1 4 3 2)
=> (seq {:a 1, :b 2})
@Engelberg
Engelberg / Frequencies.md
Last active March 22, 2018 22:06
An analysis of different methods for implementing frequencies in Clojure

First, here is the cleverly concise version of freqs that I showed in class, which builds a bunch of maps that map each element to the number 1, and then merges them together using +:

(defn freqs [l]
  (apply merge-with + (for [item l] {item 1})))

Here is one way of coding it using loop-recur:

@nickloewen
nickloewen / bret_victor-reading_list.md
Last active June 9, 2024 14:39
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★