This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{listings} | |
\usepackage{lstautogobble} % Fix relative indenting | |
\usepackage{color} % Code coloring | |
\usepackage{zi4} % Nice font | |
\definecolor{bluekeywords}{rgb}{0.13, 0.13, 1} | |
\definecolor{greencomments}{rgb}{0, 0.5, 0} | |
\definecolor{redstrings}{rgb}{0.9, 0, 0} | |
\definecolor{graynumbers}{rgb}{0.5, 0.5, 0.5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(comment | |
(import '[java.time Duration]) | |
@(def subs (slurp "/Users/felipecortez/suboverride.ttml")) | |
(spit "/Users/felipecortez/suboverride-good.ttml" | |
(clojure.string/replace subs #"\d\d:\d\d:\d\d\.\d\d\d" shifted))) | |
(defn shifted [cue-timing] | |
(let [[h m s ms] (map #(Integer/parseInt % 10) (str/split cue-timing #"[:.]")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/env bash | |
line=$(echo "· interpunct|◊ diamond" | rofi -sep '|' -dmenu -p) | |
exit_code=$? | |
printf $line | bb -i '(println (str (ffirst *input*)))' | iconv -f UTF8 -t UTF16BE | xvkbd -utf16 -file - | |
# for debugging LE/BE iconv | |
# od -A x -t x1z -v | |
# babashka definitely is overkill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, unzip, pkgs, autoPatchelfHook, zlib}: | |
pkgs.stdenv.mkDerivation { | |
name = "babashkabin"; | |
src = pkgs.fetchurl { | |
url = "https://github.com/borkdude/babashka/releases/download/v0.2.4/babashka-0.2.4-linux-amd64.zip"; | |
sha256 = "d56ff45b80226685bf2f804718780a82d30cffa4bda701a28cb170de176bc1fa"; | |
}; | |
nativeBuildInputs = [ unzip autoPatchelfHook ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.java.io :as io]) | |
(defn visit-print | |
"println approach" | |
[path level] | |
(when (some #(clojure.string/includes? % ".md") (file-seq (io/file path))) | |
(println (str (apply str (repeat level " ")) "- " (.getName (io/file path)))) | |
(doseq [path (.listFiles (io/file path))] (visit-print path (inc level))))) | |
(defn visit-print |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bindsym $mod+d exec "rofi -matching fuzzy -show run -modi \\"run,window\\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/'<,'>s/href="\([^"]*\)"/href="{{ url_for('static', filename='\1') }}"/g | |
copy from minibuffer with C-x h + M-w (https://emacs.stackexchange.com/a/37181) | |
paste with C-y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt, a4paper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[brazilian]{babel} % Hifenização e dicionário | |
\usepackage[left=3.00cm, right=2.00cm, top=3.00cm, bottom=2.00cm]{geometry} | |
\usepackage{enumitem} % Para itemsep etc | |
\usepackage{longtable} % Dependência do longtabu | |
\usepackage{tabu} % Para melhor criação de tabelas | |
\usepackage{listings} % Para códigos | |
\usepackage{lstautogobble} % Códigos indentados corretamente | |
\usepackage{color} % Para coloração de códigos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import sys | |
import time | |
import rtmidi | |
import liblo | |
from rtmidi.midiutil import open_midiinput, open_midioutput | |
from PyQt5.QtWidgets import QWidget, QApplication | |
from PyQt5.QtGui import QPainter, QColor, QFont | |
from PyQt5.QtCore import Qt, QPointF, QRectF, QTimer, pyqtSlot, pyqtSignal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [] = pre1() | |
clf() | |
x = [1, zeros(1,99)] | |
y = filter([1], [1, 0.95], x) | |
plot2d3(y) | |
endfunction | |
function [] = pre2() | |
clf() | |
h = iir(10, 'lp', 'butt', 0.125, [0 0]) |
NewerOlder