Skip to content

Instantly share code, notes, and snippets.

@wfairclough
wfairclough / send.sh
Created February 3, 2024 03:41 — forked from miguelmota/send.sh
Golang UDP server example
echo 'hello world' > /dev/udp/0.0.0.0/3000
@wfairclough
wfairclough / launch.json
Created December 8, 2021 23:33 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@wfairclough
wfairclough / pandoc2redmine.sh
Last active August 27, 2015 22:52 — forked from dergachev/pandoc2redmine.sh
pandoc2redmine.sh - wrapper script on pandoc to fix textile output for Redmine compatibility
#! /bin/env bash
cat $1 | ruby -pe 'puts " "*20 if $_.match("^```$")' \
| pandoc -f markdown -t textile \
| ruby -r CGI -n -e 'print CGI.unescapeHTML($_);' \
| ruby -ne 'puts $_ unless $_.match(" "*20)' \
| pbcopy
# without spaces, pandoc outputs "bc." for code blocks, which isn't accepted to redmine
# it also annoyingly HTML escapes its pre- block contents
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl