Skip to content

Instantly share code, notes, and snippets.

View j-morano's full-sized avatar

José Morano j-morano

View GitHub Profile
@j-morano
j-morano / radar.ipynb
Created May 24, 2024 14:19 — forked from donglixp/radar.ipynb
Radar figure in BEiT-3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\usepackage{soulutf8, color}
\usepackage{tikz}
\definecolor{lightgray}{HTML}{AAAAAA}
\usetikzlibrary{calc}
\makeatletter
\newif\if@anonymize
@j-morano
j-morano / capslock_super_esc.md
Created August 30, 2022 14:42 — forked from bendavis78/capslock_super_esc.md
Mapping Caps Lock to simultaneous Esc and Super (Mod4)

Mapping Caps Lock to simultaneous Esc and Super (Mod4)

The CAPS key can be mapped to an escape key when pressed once, and a super (mod4) key when used in combination with other keys.

Create the file /usr/share/X11/xkb/symbols/custom_opts with the following:

// Make Caps an additional Escape
hidden partial modifier_keys
xkb_symbols "super_esc" {

key { [ Escape ] };

class UniversalFactory:
classes = []
def __init__(self, classes=None):
if classes is not None:
self.classes = classes
self.classes_names = {
class_.__name__: class_
for class_
@j-morano
j-morano / pagination_example.sql
Created October 18, 2021 17:30 — forked from ssokolow/pagination_example.sql
Reasonably efficient pagination without OFFSET (SQLite version)
-- Reasonably efficient pagination without OFFSET
-- SQLite version (Adapted from MS SQL syntax)
-- Source: http://www.phpbuilder.com/board/showpost.php?p=10376515&postcount=6
SELECT foo, bar, baz, quux FROM table
WHERE oid NOT IN ( SELECT oid FROM table
ORDER BY title ASC LIMIT 50 )
ORDER BY title ASC LIMIT 10

tmux cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname