- Pfctl man page (apple.com)
- Pf.conf man page (apple.com)
- How to secure your Mac when using it on wireless networks (sarfata.org)
- Pf on OS X 10.7 (zomo.co.uk)
- OpenBSD packet filter (PF): Real life example (daemon-notes.com)
- Firewalling with OpenBSD's PF packet filter (rlworkman.net)
- PF (OpenBSD) (readthedocs.org)
- PF rules (kernel-panic.it)
TL;DR: Using an old Raspberry Pi hosted at home in conjunction with CloudFlare and DuckDNS as $1/yr web hosting.
After cPanel hiked its prices, the hosting company I've been using went out of business. I looked for some shared hosting options. They ranged from $30 to $60 a year. That's much more than I want to pay (especially coming from a much better deal with my previous host). My solution is to host them at home on a Raspberry Pi.
I chose a Pi as my hardware versus a spare laptop, since a laptop would cost me at least $30 in electricity in a year. The Pi on the other hand will cost about $1 in electricity. The problem with hosting at home is my IP address will change from time to time. So I had to get a little creative.
I setup DuckDNS to track my IP address. http://example.duckdns.org points to my home IP address and there's a cron job on my Pi that updates my DuckDNS account every 5 minutes. So when my IP address changes, http://example.duckdns.org gets updated automatically.
I pointed my nam
This will allow you to include additional directories to what cd
will look at for completions. From the bash
man page:
The search path for the cd command. This is a colon-separated list of directories in which the shell looks for destination directories specified by the cd command.
<?php | |
try { | |
$user = get_user_from_database($emailFromLoginForm); // pseudo | |
if ($user->password === md5($plainTextPasswordFromLoginForm)) { | |
// We've identified that the password in the database is a md5 hash, so | |
// we'll salt and hash the plain-text password and save it | |
$saltedPassword = password_hash($plainTextPasswordFromLoginForm, PASSWORD_DEFAULT); | |
$user->password = $saltedPassword; // pseudo |
#!/bin/sh -e | |
for attr in $(seq 0 1); do | |
for fg in $(seq 30 37); do | |
for bg in $(seq 40 47); do | |
printf "\033[$attr;${bg};${fg}m$attr;$fg;$bg\033[m " | |
done | |
echo | |
done | |
done |
#!/bin/bash | |
# | |
# _/_/_/ _/_/_/ _/_/_/_/ | |
# _/ _/ _/ | |
# _/ _/_/ _/ _/_/_/ | |
# _/ _/ _/ _/ | |
# _/_/_/ _/_/_/ _/ | |
# | |
# Uses ffmpeg to generate | |
# animated gifs from mov |
THE BOY WHO LIVED | |
Mr. and Mrs. Dursley, of number four, Privet Drive, | |
were proud to say that they were perfectly normal, | |
thank you very much. They were the last people you’d | |
expect to be involved in anything strange or | |
mysterious, because they just didn’t hold with such | |
nonsense. | |
Mr. Dursley was the director of a firm called |
describe("anyOtherFunctionName", function() { | |
it("should not use indexOf", function() { | |
var body = anyOtherFunctionName.toString(); | |
expect(/indexOf/.test(body)).toBe(false); | |
expect(anyOtherFunctionName("a", "I am a hacker")).toBe(2); | |
}); | |
it("should return a number", function() { | |
expect(typeof anyOtherFunctionName("a", "I am a hacker")).toBe("number"); | |
}); | |
it("should return the index of the first occurence of a string", function() { |