Skip to content

Instantly share code, notes, and snippets.

bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key " split-window
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key % split-window -h
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
@jhrr
jhrr / tmux split-window subcommand.md
Created July 22, 2024 09:11 — forked from sdondley/tmux split-window subcommand.md
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

@jhrr
jhrr / mysql-to-postgres.sh
Created February 6, 2024 14:19 — forked from dougvj/mysql-to-postgres.sh
Mysql to Postgres SQL file conversion
# Adapted from github comment:
# https://github.com/dimitri/pgloader/issues/782#issuecomment-1136067634
if [ -z "$3" ]; then
echo "Usage: $0 <db name> <mysql dump> <psql dump output>"
echo "Requirements: docker"
exit 1
fi
if ! command -v docker &> /dev/null
@jhrr
jhrr / _HowToSetupAWSWAFv2.md
Created July 3, 2023 22:13 — forked from masayoshi644/_HowToSetupAWSWAFv2.md
How to setup AWS WAFv2
@jhrr
jhrr / Export MUBI lists.js
Created February 12, 2021 18:26
Export MUBI lists
$('#multi-films .film-grid').children().map(function() {
var $this = $(this),
rank = $this.find('.list-film-position').text().trim(),
title = $this.find('.film-title').text().trim(),
dirYear = $this.find('.director-year').text().trim(),
re = dirYear.match(/^(.+), (\d+)$/),
dir = re ? re[1] : dirYear,
year = re ? re[2] : '';
return [rank, title, year, dir].join('\t');
}).get().join('\n');
@jhrr
jhrr / create_function_plv8_cuid.sql
Created October 27, 2020 14:49 — forked from notakaos/create_function_plv8_cuid.sql
cuid for PostgreSQL with PL/v8
-- original code: https://github.com/ericelliott/cuid
-- Add the "plv8" extension
create extension if not exists "plv8";
-- Add the "pgcrypto" extension
create extension if not exists "pgcrypto";
\dx
-- Connect a database
from django.db.migrations.recorder import MigrationRecorder
>>> MigrationRecorder.Migration.objects.all()
>>> MigrationRecorder.Migration.objects.latest('id')
Out[5]: <Migration: Migration 0050_auto_20170603_1814 for model>
>>> MigrationRecorder.Migration.objects.latest('id').delete()
Out[4]: (1, {u'migrations.Migration': 1})

Star Trek TNG Ideal Types

Can be found in different ratios per episode.

  • Inexplicable being of pure energy.
  • Q acting the bellend.
  • Someone is horny.
  • Counsellor Troy's mum.
  • Holodeck rubbish.
  • Data learns something.
// "http://coleingraham.com/2014/09/26/an-approach-to-custom-scales-in-supercollider/"
s.boot;
(
~makeScale = { |ratios|
Scale(
(0..ratios.size-1),
ratios.size,
Tuning((ratios.ratiomidi % 12).sort)