Skip to content

Instantly share code, notes, and snippets.

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
@endreszabo
endreszabo / targyeset.pl
Created Apr 22, 2022
Automatikus targyeset mutato script
View targyeset.pl
weechat::register(
"targyeset",
"Automatikus targyeset",
"1.0",
"GPL2",
"Script ami segit latszatni az automatikus targyeset",
"", ""
);
sub sendtext_data {
@endreszabo
endreszabo / asciicast-timestamp-converter.pl
Created Jun 28, 2018
asciinema asciicast recording absolute/relative time converter for fine adjustments of output delays in post-production
View asciicast-timestamp-converter.pl
#!/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 / archzfs-kernels-make.sh
Created May 8, 2018
Make your very own archzfs-tied kernels Arch Linux repository.
View archzfs-kernels-make.sh
#!/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 / xor.pl
Last active Mar 17, 2016
Perl that XORs.. for science!
View xor.pl
#!/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);}
View TmuxTeXEx.sh
#!/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 / aessss.sh
Created Jan 20, 2014
aessss. q&d combination of aes and ssss.
View aessss.sh
#!/bin/bash
for i in $*; do
HASH=$(openssl dgst -sha256 -binary < "$i" | perl -ne'map{printf("%02x",ord($_))} split//')
KEY=$(dd if=/dev/random bs=1 count=32 | perl -ne'map{printf("%02x",ord($_))} split//')
echo -n "$KEY" | openssl aes256 -aes-256-xts -e -pass stdin -in "$i" -out "${HASH}.bin"
echo -n "$KEY" | ssss-split -x -t 3 -n 4 -w "$HASH" -q | split --lines=1 --numeric-suffixes=1 --suffix-length=1 - "$HASH-"
done
@endreszabo
endreszabo / koponyeg_rss.py
Created Nov 21, 2013
koponyeg.hu RSS feedparser hinting
View koponyeg_rss.py
import feedparser
def start_koponyeg_elorejelzes(self, attrsD):
context = self._getContext()
context['koponyeg_elorejelzes_%s' % attrsD['nap']] = attrsD
feedparser._FeedParserMixin._start_koponyeg_elorejelzes = start_koponyeg_elorejelzes
feed = feedparser.parse('http://koponyeg.hu/idojaras_rss.php?regios=1')
@endreszabo
endreszabo / unshorten_bookmarklet.js
Created Aug 27, 2013
unshortr url submit bookmarklet
View unshorten_bookmarklet.js
#!/usr/bin/perl
local$/;$_='javascript:'.<DATA>;$_=~s/\) \{\n/){\n/g;$_=~s/\n\s*//g;print;
__DATA__
USSw=open('','unshorten_url_submit','width=400,height=200,scrollbars,resizable,menubar');
OSUl=document.links;
with(USSw.document) {
write('<base target=_self><p>Ushorten Bookmarklet has ');
if(OSUl.length>0) {
write('found the following URLs. Click on any of these to submit to Unshorten delvelopers.</p>');
for(USi=0;USi<OSUl.length;USi++) {
@endreszabo
endreszabo / Xdefaults
Created Jan 19, 2013
c64 theme for (u)rxvt
View Xdefaults
urxvt-c64*font: xft:Adore 64:pixelsize=16
urxvt-c64*boldFont: xft:Adore 64:pixelsize=16
urxvt-c64*internalBorder: 64
urxvt-c64*color0: rgba:0000/0000/CC00/ffff
urxvt-c64*color15: rgba:FF00/FF00/FF00/ffff
urxvt-c64*color1: rgba:CC00/0000/0000/ffff
urxvt-c64*color14: rgba:0000/FF00/CC00/ffff
urxvt-c64*color5: rgba:FF00/0000/FF00/ffff
urxvt-c64*color2: rgba:0000/CC00/0000/ffff
urxvt-c64*color4: rgba:0000/0000/CC00/ffff
@endreszabo
endreszabo / foobar.c
Created Dec 4, 2012
usin intel's ivy-bridge rdrand hrng
View foobar.c
#include <stdio.h>
#include <string.h>
#include "rdrand.h"
#define BUFFSIZE 65536
int main()
{
int r;