A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
import numpy as np | |
from scipy.io import wavfile | |
import librosa | |
import renderman as rm | |
SAMPLE_RATE = 44100 | |
BUFFER_SIZE = 512 | |
REVERB_PLUGIN = "C:/path/to/reverb.dll" | |
SYNTH_PLUGIN = "C:/path/to/synth.dll" |
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://www.opengis.net/kml/2.2"> | |
<Document> | |
<name>Red Bull X-Alps 2019 Route</name> | |
<snippet>https://www.redbullxalps.com/ Created by twpayne@gmail.com</snippet> | |
<open>1</open> | |
<Folder> | |
<name>Route</name> | |
<Placemark> | |
<LineString> |
Add the following in .zshrc: | |
... | |
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
... | |
### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
pasteinit() { | |
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
Code | Terminology | Kind | Usage | Line | |
---|---|---|---|---|---|
$scr | scripting additions folder | Property of class: domain | System Events : Disk-Folder-File Suite | 1 | |
%doc | music folder | Property of class: user domain object | System Events : Disk-Folder-File Suite | 2 | |
µdoc | music folder | Enumeration | Standard Additions : File Commands | 3 | |
ƒhlp | help | Enumeration | Standard Additions : File Commands | 4 | |
ƒhlp | help folder | Enumeration | Standard Additions : File Commands | 5 | |
ƒlib | shared libraries | Enumeration | Standard Additions : File Commands | 6 | |
ƒlib | shared libraries folder | Enumeration | Standard Additions : File Commands | 7 | |
ƒmod | modem scripts | Enumeration | Standard Additions : File Commands | 8 | |
ƒmod | modem scripts folder | Enumeration | Standard Additions : File Commands | 9 |
In order to tunnel all iOS Internet traffic using SSH:
config.pac
file to copy it to a clipboard.See a detailed video: https://www.youtube.com/watch?v=8r0eEr36Dg4