Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben benleb

View GitHub Profile
View bypass EVAL_PERL in perl template
[% template.new({ 'BLOCK' => 'system("uname -a"); die' }) %]
@benleb
benleb / syslog2journald.service
Created Nov 1, 2019
Poor man's syslog2journald service
View syslog2journald.service
[Unit]
Description=Syslog UDP proxy via socat
After=network.target
[Service]
Restart=on-success
ExecStart=/usr/bin/systemd-cat --identifier=syslog-udp /usr/bin/socat -u UDP-RECV:514,bind=10.0.0.10 STDOUT
[Install]
WantedBy=multi-user.target
@benleb
benleb / scrapecloud.js
Last active Feb 17, 2018
get all direct links from a soundcloud playlist
View scrapecloud.js
/* eslint no-await-in-loop: off, no-console: off */
// scrapecloud.js | 02/18
// get all direct links from soundcloud playlists
const puppeteer = require('puppeteer');
const scBaseUrl = 'https://soundcloud.com';
const scPlaylistUrl = `${scBaseUrl}/alex-humenyuk/sets/street-workout`;