Skip to content

Instantly share code, notes, and snippets.

View endreszabo's full-sized avatar
💭
I may be slow to respond. Btw I use Arch.

Endre Szabo endreszabo

💭
I may be slow to respond. Btw I use Arch.
View GitHub Profile
#!/bin/bash
# Tmux based TeX editor helper
EDITOR="${EDITOR:-vim}"
DOCUMENT="${1:-deriv}"
SESSIONID="tmuxtexex_${DOCUMENT}_$$"
tmux new-session -d -s "${SESSIONID}" && tmux new-window -t "${SESSIONID}:1" -n 'TmuxTeXEx' "$EDITOR ${DOCUMENT}.tex" && tmux split-window -v -l 6 -t "${SESSIONID}:1" "while :; do inotifywait -e modify \"${DOCUMENT}.tex\" && { make || pdflatex \"${DOCUMENT}.tex\" } && jobs %% || { evince \"${DOCUMENT}.pdf\" & }; done" && tmux select-pane -U -t "${SESSIONID}:1" && tmux -2 attach-session -t "${SESSIONID}"
@endreszabo
endreszabo / xor.pl
Last active March 17, 2016 15:53
Perl that XORs.. for science!
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use List::Util qw( shuffle );
my $o='`^._-=>;:/()|[]{}#@%+$&?*~,"';
my $s=join(" ",@ARGV)||"egyenisegek vagytok mind!";
sub xorsplit($){my$oa;my$ob;out:foreach my$c(split//,shift){foreach my$a(shuffle split//,$o){foreach my$b(shuffle split//,$o){if((ord($a)^(ord($b)))==ord($c)){$oa.=$a; $ob.=$b;next out;}}}printf"Failed looking up '%s'\n",$c;}return($oa,$ob);}
@endreszabo
endreszabo / archzfs-kernels-make.sh
Created May 8, 2018 11:08
Make your very own archzfs-tied kernels Arch Linux repository.
#!/usr/bin/env bash -x
set -o nounset
set -o errexit
curl http://archzfs.com/archzfs/x86_64/archzfs.db | tar xJvf -
cat */desc | perl -e'while(<>) {
if (m/^%DEPENDS/) {
while(<>) {
@endreszabo
endreszabo / asciicast-timestamp-converter.pl
Created June 28, 2018 08:41
asciinema asciicast recording absolute/relative time converter for fine adjustments of output delays in post-production
#!/usr/bin/env perl
#===============================================================================
#
# FILE: asciicast-timestamp-converter.pl
#
# USAGE: ./asciicast-timestamp-converter.pl [filename]
# USAGE: cat filename | ./asciicast-timestamp-converter.pl
#
# DESCRIPTION: asciinema asciicast recording absolute/relative time converter
# for fine adjustments of output delays in post-production
@endreszabo
endreszabo / targyeset.pl
Created April 22, 2022 07:55
Automatikus targyeset mutato script
weechat::register(
"targyeset",
"Automatikus targyeset",
"1.0",
"GPL2",
"Script ami segit latszatni az automatikus targyeset",
"", ""
);
sub sendtext_data {