Difference between revisions of "Random Stuff"
Jump to navigation
Jump to search
(Added hipe bitarray link) |
(Added subnetting craziness) |
||
Line 31: | Line 31: | ||
== OpenBSD key life times in ipsec.conf == | == OpenBSD key life times in ipsec.conf == | ||
Use the undocumented 'life' keyword for quick and main mode [http://kerneltrap.org/mailarchive/openbsd-misc/2007/12/7/481748 see here]. | Use the undocumented 'life' keyword for quick and main mode [http://kerneltrap.org/mailarchive/openbsd-misc/2007/12/7/481748 see here]. | ||
+ | |||
+ | == Subnet calculations === | ||
+ | I always forget how to do these. | ||
+ | |||
+ | The Broadcast Address is obtained doing a binary OR between an address in the subnet and the inverted Subnet Mask. You can invert the subnet mask by XORing it with the decimal representation of 255.255.255.255. | ||
+ | |||
+ | The Subnet Address is obtained by doing a binary AND between an address in the subnet and its Subnet mask. | ||
+ | |||
+ | A handy tool to convert address to/from decimal can be found [http://www.countryipblocks.net/tools/ip-octet-binary-and-decimal-calculators/ here] |
Revision as of 13:34, 13 August 2009
- Taming Firefox
- Ruby 1.9
- Resetting Dell Powerconnect Switch Passwords
- Making hme1 probe correctly on Sun Netra t1 105 servers
- hacking trac so it shows svn usernames for people without email addresses in the RSS feed
To convert asterisk gsm files to wav files it can still play:
sox tt-weasels.gsm -r 8000 -b -c 1 -u -2 tt-weasels.wav
Upgrading pkgsrc bootstrapped packages (bmake install-sh nawk nbsed pax tnftp bootstrap-mk-files):
bmake USE_DESTDIR=full package rm /var/db/pkg/<pkgname>-<pkgversion>/+PRESERVE pkg_delete "<pkgname>*" pkg_add /usr/pkgsrc/packages/All/<pkgname>-<pkgversion>.tgz touch /var/db/pkg/<pkgname>-<pkgversion>/+PRESERVE
- List of Operating System Defines - Handy for doing OS checking in the C preprocessor.
- Stian's CLI currency converter - Install the perl libwww stuff if it bitches about LWP/Simple
- Erlang HIPE bitarrays - Undocumented mutable bitarrays/binaries for Erlang (when using HIPE)
OpenBSD key life times in ipsec.conf
Use the undocumented 'life' keyword for quick and main mode see here.
Subnet calculations =
I always forget how to do these.
The Broadcast Address is obtained doing a binary OR between an address in the subnet and the inverted Subnet Mask. You can invert the subnet mask by XORing it with the decimal representation of 255.255.255.255.
The Subnet Address is obtained by doing a binary AND between an address in the subnet and its Subnet mask.
A handy tool to convert address to/from decimal can be found here