Skip to content

Instantly share code, notes, and snippets.

View trapd00r's full-sized avatar
🐫
japh

magnus woldrich trapd00r

🐫
japh
View GitHub Profile
# vim:ft=perl:et:
# # change background color when focus lost/gained
use strict;
use warnings;
use Time::HiRes qw(usleep);
# NOTE: Default xterm/iTerm2 enable/disable: CSI ? 1004 h/l
# e.g.: <Esc>[?1004l / <Esc>[?1004h
# i7, 32G ram, x64 archlinux, steam play with proton 3-7.8
35 damage taken! [objPlayer1]
> Blessing [Mahntis Blessing] spawned!
Saving Data [0]: Async Begin
COMMITTING DATA...
COMMIT DONE (0ms)
@trapd00r
trapd00r / attributes.pl
Last active March 5, 2019 05:37
T::E attribute mess
=for comment
This is messy. According to spec...
38;1
should yield bold, and it does in urxvt and vte, but not in xterm.
38;1;3;4;5;7
@trapd00r
trapd00r / Extension.pm
Created December 14, 2018 16:50
All the filetypes in the universe
package File::Extension;
use strict;
use Carp ();
use Data::Dumper;
{
package Data::Dumper;
no strict 'vars';
$Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;
[Audio]
MuteDesktopHotkey=0
MuteMicHotkey=0
PushToTalkHotkey2=0
PushToTalkHotkey=0
UsePushToTalk=0
SyncToVideoTime=0
DesktopVolume=1.000000
make test QUIET=y
make[1]: Entering directory '/j/tmp/zsh-syntax-highlighting'
Running test brackets
Running test main
# option-path_dirs
1..1
not ok 1 - [1,21] «bar/testing-issue-228» - expected "command", observed "unknown-toke n".
ln: failed to create symbolic link 'broken-symlink': No such file or directory
Bail out! output on stderr
# path-broken-symlink
#!/usr/bin/perl
# vim: ft=perl:fdm=marker:fmr=#<,#>:fen:et:sw=2:
use strict;
use warnings FATAL => 'all';
use vars qw($VERSION);
my $APP = 'clone_gh';
$VERSION = '0.001';
my @repos=qw(
@trapd00r
trapd00r / amigaremixripper.sh
Created May 21, 2015 13:48
amigaremix.com ripper
#!/bin/sh
# vim: synmaxcol& ft=zsh:
mkdir -p amigaremix && cd amigaremix;
wget $( \
for x in $( \
for d in {1..64};
do printf "http://amigaremix.com/remixes/$d\n";
done
); do curl -s $x; done \
| grep -iPo 'a href=..listen.+\.mp3"' \
@trapd00r
trapd00r / gist:5852082
Created June 24, 2013 17:58
colorscheme if tty || $SSH_CLIENT
if $TERM == 'linux' || $SSH_CLIENT
let &t_Co = 8
color peachpuff
set nolist
set colorcolumn+=81
hi CursorLine term=none cterm=bold ctermbg=0
hi! link CursorColumn CursorLine
hi! link ColorColumn CursorLine
else
@trapd00r
trapd00r / gist:5852065
Created June 24, 2013 17:56
colorscheme if $SSH_CLIENT
fu! SSH()
if $SSH_CLIENT
color ssh
else
color neverland
endfu