Skip to content

Instantly share code, notes, and snippets.

@nxadm
nxadm / Spotify AdBlocking
Last active May 25, 2020 02:52
List formatted for pihole
# Spotify AdBlocking for pihole
#
# So far these lists have been problematic for the desktop players with a premium subscription:
# - https://github.com/StevenBlack/hosts/issues/668 (proposal for StevenBlacks List)
# - https://raw.githubusercontent.com/CHEF-KOCH/CKs-FilterList/master/Corporations/Spotify%20Ad-Free/CK's-Spotify-FilterList.txt
adclick.g.doublecklick.net
adeventtracker.spotify.com
ads-fa.spotify.com
analytics.spotify.com
audio2.spotify.com
Test Summary Report
-------------------
t/04-nativecall/12-sizeof.t (Wstat: 139 Tests: 13 Failed: 0)
Non-zero wait status: 139
Parse errors: Bad plan. You planned 17 tests but ran 13.
Files=90, Tests=1728, 129 wallclock secs ( 0.63 usr 0.22 sys + 241.56 cusr 13.63 csys = 256.04 CPU)
Result: FAIL
Makefile:573: recipe for target 'm-coretest5' failed
make: *** [m-coretest5] Error 1
t/04-nativecall/02-simple-args.t ................................ Failed 14/14 subtests
t/04-nativecall/07-writebarrier.t ............................... ok
t/04-nativecall/08-callbacks.t .................................. ok
t/04-nativecall/09-nativecast.t ................................. ok
t/04-nativecall/10-cglobals.t ................................... ok
t/04-nativecall/05-arrays.t ..................................... ok
t/04-nativecall/06-struct.t ..................................... ok
t/04-nativecall/14-rw-attrs.t ................................... ok
t/04-nativecall/11-cpp.t ........................................ ok
t/04-nativecall/12-sizeof.t ..................................... ok
#!/usr/bin/env perl
# Update pwdChangedTime to match sambaPwdLastSet which is provided by by IAM.
# Bugs to [email protected].
# CentOS 7 dependencies:
# - perl-LDAP
# - perl-TermReadKey
# Debian/Ubuntu dependencies:
# - libnet-ldap-perl
# - libterm-readkey-perl
our $VERSION = '0.2.0';
@nxadm
nxadm / blin
Created October 30, 2019 20:46
~/Code/nxadm/raku-blin-docker$ docker run -ti -v /var/tmp/Blin-volume:/mnt rakudo/blin
🥞 Prep
🥞 Will use up to 4 threads for testing modules
Type List does not support associative indexing.
in sub ensure-required-config-values at /opt/rakudo-pkg/share/perl6/site/sources/2BF6F70EDCCD7C9CBA771FFFACF269753F9BDB9D (Whateverable::Config) line 33
in sub ensure-config at /opt/rakudo-pkg/share/perl6/site/sources/2BF6F70EDCCD7C9CBA771FFFACF269753F9BDB9D (Whateverable::Config) line 50
in sub MAIN at bin/blin.p6 line 114
in block <unit> at bin/blin.p6 line 11
root@62312889d522:/# ssh github.com
Warning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
root@62312889d522:/# git clone [email protected]:nxadm/raku-blin-docker.git
Cloning into 'raku-blin-docker'...
Warning: Permanently added the RSA host key for IP address '140.82.118.4' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
#pkg;Module(s)
libsdl1.2-dev;SDL
libsdl-mixer1.2-dev;SDL
libsdl-image1.2-dev;SDL
libfoo;Foo,Bar,Baz
@nxadm
nxadm / bash?
Created November 8, 2019 17:33
$ docker run -ti -v ~/Downloads:/mnt centos:6 bash
[root@bc847ce8edfb /]# /mnt/rakudo-2019.07.1/bin/set-env.sh
[root@bc847ce8edfb /]# . /mnt/rakudo-2019.07.1/bin/set-env.sh
ERROR: 'bash' does not exist.
[root@bc847ce8edfb /]# cat /mnt/rakudo-2019.07.1/bin/set-env.sh
#!/bin/sh
# Sourced from https://stackoverflow.com/a/29835459/1975049
rreadlink() (
target=$1 fname= targetDir= CDPATH=
PROFILE_SCRIPT=/etc/profile.d/$PKG_NAME.sh
/usr/bin/cat - <<EOSCR >$PROFILE_SCRIPT
RAKUDO_PATHS=$INSTALL_PREFIX/bin
for TOP in raku perl6
do
if [ -d $INSTALL_PREFIX/share/\$TOP ]
then
for REP in site vendor core
// jwtInspectMiddleware checks if a token is valid (signature and not issued before
// a not-before date) and sets requester and owners in the context.
func (client *Client) jwtInspectMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
var (
ok bool
claims jwt.MapClaims
)
token, ok := c.Get("user").(*jwt.Token)