Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 8, 2024 07:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pascalpoitras
pascalpoitras / config.md
Last active May 7, 2024 14:03
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active April 20, 2024 13:55
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@VladimirPal
VladimirPal / neomuttrc
Last active March 30, 2024 11:59
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster
@trentgill
trentgill / sequins_arith.lua
Created November 14, 2021 05:01
sequins_arithmetic
-- base sequins
s1 = s{0,4,7}
s1(),s1(),s1() --> 0, 4, 7
-- apply a pattern 'transformer' function to maybe add an octave
s1:fn(function(n) return (n>5) and n or n+12 end)
s1(),s1(),s1() --> 12, 16, 7
@trentgill
trentgill / chance.lua
Last active November 15, 2023 01:29
timeline chance
--- some possible implementations of a probable function
-- really comes down to whether it's a timeline native behaviour
-- or if we just want a general fn to a wrap an application with chance
-- original version without chance
notesss = { 1, kick
, 1, {ii.wsyn.play_note, s{0,-12}, 2}
}
-- tl.chance is a function that takes a probability, and an action
@Pitometsu
Pitometsu / configuration.nix
Last active July 11, 2023 18:58
NixOS system config
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
rec {
imports =
@mhawksey
mhawksey / gist:1170597
Created August 25, 2011 13:02
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user