Skip to content

Instantly share code, notes, and snippets.

@drmalex07
drmalex07 / README-setup-socket-activated-systemd-service.md
Last active September 20, 2025 21:40
An example inetd-like socket-activated service. #systemd #inetd #systemd.socket

README

This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.

Define a socket unit

The key point here is to specify Accept=yes, which will make the socket accept connections (behaving like inetd) and pass only the resulting connection socket to the service handler.

@ahupowerdns
ahupowerdns / simple-adblock-powerdns.md
Last active July 31, 2024 21:11
How to do really simple adblocking with the PowerDNS Recursor 4.x

First, clone the Mozilla focus project and make it fetch its list:

$ git clone https://github.com/mozilla/focus.git
$ cd focus
$ ./checkout.sh
$ cd Lists

This delivers several JSON formatted files, of which we are going to use disconnect-advertising.json. We'll filter out the good bits using jq, and create a Lua representation:

(
@stenstorp
stenstorp / maya2016.sh
Last active February 24, 2025 16:53 — forked from MichaelLawton/gist:ee27bf4a0f591bed19ac
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#!/bin/bash
#Download Maya from here: http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
#Get a student License from: http://www.autodesk.com/education/free-software/maya
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# BEFORE RUNNING, REPLACE "USER" AND "HOME" AT THE BOTTOM OF THIS SCRIPT WITH YOUR USERNAME AND HOME FOLDER
# !!!!!! IMPORTANT !!!!!!
@nathwill
nathwill / systemd-nspawn containers on centos
Last active April 12, 2022 03:43
super lightweight containers with systemd-nspawn
assumes centos 7 host, typical configuration
- disable selinux: SELINUX=permissive in /etc/sysconfig/selinux
- disable auditd: systemctl disable auditd.service
- enable journald persistence: `Storage=persistent` in /etc/systemd/journald.conf
- mkdir /var/lib/container
- yum -y --nogpg --releasever=7 --installroot=/var/lib/container/centos install systemd passwd yum vim-minimal openssh-server
- systemd-nspawn -D /var/lib/container/centos
- set root passwd, set ssh port (e.g. 2222)
- set up systemd-nspawn service:
@jamesramsay
jamesramsay / README.md
Last active June 10, 2017 23:06
HAR analysis

Analysis of editorial vs advertising content

Methodology:

  • Access mobile site using Chrome device debugging tools
  • Record network activity
  • Save as HAR
  • Clean recording

Clean Recording

@pisculichi
pisculichi / radios_nacionales.txt
Last active November 9, 2025 19:16
URLs de radios nacionales de Argentina, para poder escuchar en la terminal con mplayer o vlc
# alias radio='function __radio(){ r=`grep -v "#" radios_nacionales.txt | grep -m 1 -i $1 | cut -d" " -f1`; cvlc $r 2> /dev/null; }; __radio'
# podria utilizarse mplayer en vez de vlc
AMs Nacionales
http://cdn.instream.audio:9288/stream Radio Madre 530
https://streaming1.hostingmontevideo.com:7019/; Radio Colonia 550
http://server.laradio.online:25224/live.mp3 Radio Argentina 570
http://playerservices.streamtheworld.com/api/livestream-redirect/CONTINENTAL_SC Continental 590
https://streammax.alsolnet.com/radiorivadavia Rivadavia 630
@johncylee
johncylee / mailauth.py
Created September 4, 2015 06:14
Simple Python script to test SMTP, POP3 & IMAP4 auth.
#!/usr/bin/env python
from smtplib import SMTP, SMTP_SSL
from poplib import POP3, POP3_SSL
from imaplib import IMAP4, IMAP4_SSL
import argparse
def smtp(host, user, password):
tests = [SMTP(host), SMTP_SSL(host)]
@uggedal
uggedal / Makefile
Last active October 18, 2018 22:19
Void Linux qutebrowser docker container hack
# make:
# Creates a Void Linux docker container with qutebrowser.
# make run:
# Runs qutebrowser in aforementioned container
REPO = http://muslrepo.voidlinux.eu/
XBPS_INSTALL = usr/bin/xbps-install
ROOTFS = rootfs
PACKAGES = base-system-busybox
PACKAGES += dbus
PACKAGES += ca-certificates
@tanakahx
tanakahx / json-parser.lisp
Last active August 30, 2021 12:20
JSON parser implemented with cl-lex and CL-Yacc
#|
JSON parser implemented with cl-lex and CL-Yacc
USAGE:
JSON-PARSER> (parse-with-lexer (json-lexer
"{\"foo\":\"bar\",\"baz\":\"bang\",\"bing\":100,\"bingo\":1.1,\"bazo\": [1,2,\"foo\"]}")
json-parser)
(:OBJ ("foo" . "bar") ("baz" . "bang") ("bing" . 100) ("bingo" . 1.1) ("bazo" 1 2 "foo"))
JSON-PARSER> (with-open-file (*standard-input* "test.json")
@mnot
mnot / snowden-ietf93.md
Last active November 5, 2024 06:22
Transcript of Edward Snowden's comments at IETF93.