drop
not ethertype ipv4
and not ethertype arp
and not ethertype ipv6
;
accept
dport 6445
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
var { html, title, head, body, div } = require('hyperaxe') | |
var page = html( | |
head(title('hi')), | |
body( | |
div({ id: 'app' }) | |
) | |
).outerHTML |
Use a Raspberry Pi as a bridge into my home LAN. The pi is plugged into a switch, which is plugged into an airport express, which is plugged into a cable modem; Nothing fancy.
This isn't a tutorial. Just some example output from a working setup.
off the top of my head, here's the order I would do it in:
- make sure plain old device to device zerotier is working with my LAN/Router/Firewall/ISP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var daggy = require('daggy') | |
const Machine = daggy.taggedSum('Timer', { | |
Yellow: [], | |
Green: [], | |
Red: [] | |
}) | |
Machine.prototype.timer = | |
function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun aj-javascript/post-init-mmm-mode () | |
(with-eval-after-load 'rjsx-mode | |
(mmm-add-classes '((yo | |
:submode web-mode | |
:front "html`" | |
:back "`" | |
:face mmm-declaration-submode-face))) | |
(mmm-add-mode-ext-class 'rjsx-mode nil 'yo) | |
(setq mmm-parse-when-idle 't) | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// maybeToFuture :: a -> Maybe b -> Future a b | |
const maybeToFuture = S.curry2((x, maybe) => | |
S.maybe(Future.reject(x), Future.of, maybe) | |
); | |
//also | |
/* | |
Aldwin Vlasblom @Avaq Aug 14 05:12 | |
I generally have two strategies for dealing with a Future(Just(x)): | |
Using maybeToFuture. @davidchambers just posted an implementation. I use this when Nothing represents an actual error in the code (one that can only be recovered from by my generic error recovery procedure, which usually reports the error and crashes the process). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Courtesy https://gitter.im/sanctuary-js/sanctuary | |
// maybeToFuture :: a -> Maybe b -> Future a b | |
const maybeToFuture = S.curry2((x, maybe) => | |
S.maybe(Future.reject(x), Future.of, maybe) | |
); | |
// Collapse a `Future String (Maybe Integer)` into a `Future String Integer`. | |
S.chain(maybeToFuture('parseInt: "XXX" does not represent an integer'), | |
Future.of(S.Nothing)); |
mix phoenix.new --no-ecto hello_phoenix
If I remember correctly, letting ecto in makes it look for postgres on the pi. Could probably easily set it up for sqlite?
cd hello_phoenix
cp ../nerves_examples/hello_network/Bakefile .
Add to server: true
to config section in config/prod.exs and change http to a specific port (It didn't seem to work setting PORT env variable, but I only tried once.
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# Takes all my playlists from ~/.mpd/playlists, fixes them up, and creates a | |
# folder for each, along with the music they reference. | |
# The sync stage requires an sshd server to run on your phone, as well as the rsync executable. | |
# - http://linux.wxs.ro/2011/08/05/rsync-your-android/ | |
MPD_MUSIC_ROOT="${HOME}/Music" # Root of your MPD library | |
MPD_PLAYLIST_ROOT="${HOME}/.mpd/playlists" # MPD playlist folder |