http://bash.cyberciti.biz/domain/create-bind9-domain-zone-configuration-file/
This file contains hidden or 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
| #!/bin/bash | |
| ps -A --sort -rss -o comm,pmem,rss | awk ' | |
| NR == 1 { print; next } | |
| { a[$1] += $2; b[$1] += $3; } | |
| END { | |
| for (i in a) { | |
| size_in_bytes = b[i] * 1024 | |
| split("B KB MB GB TB PB", unit) | |
| human_readable = 0 | |
| if (size_in_bytes == 0) { |
I hereby claim:
- I am gburd on github.
- I am gregburd (https://keybase.io/gregburd) on keybase.
- I have a public key whose fingerprint is D4BB 42BE 729A EFBD 2EFE BF88 2293 1AF7 895E 82DF
To claim this, I am signing this object:
This file contains hidden or 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
| http://en.wikipedia.org/wiki/Z-order_curve | |
| http://stackoverflow.com/questions/18529057/produce-interleaving-bit-patterns-morton-keys-for-32-bit-64-bit-and-128bit | |
| http://stackoverflow.com/questions/1024754/how-to-compute-a-3d-morton-number-interleave-the-bits-of-3-ints | |
| http://code.activestate.com/recipes/577558-interleave-bits-aka-morton-ize-aka-z-order-curve/ | |
| http://www.forceflow.be/2013/10/07/morton-encodingdecoding-through-bit-interleaving-implementations/ | |
| https://www.fpcomplete.com/user/edwardk/revisiting-matrix-multiplication/part-1 | |
| https://www.fpcomplete.com/user/edwardk/revisiting-matrix-multiplication/part-2 | |
| It turns out we don't have to actually interleave the bits if all we want is the ability to compare two keys as if they had been interleaved. What we need to know is where the most significant difference between them occurs. Given two halves of a key we can exclusive or them together to find the positions at which they differ. |
This file contains hidden or 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
| extract () { | |
| if [ -f $1 ] ; then | |
| case $1 in | |
| *.tar.bz2) tar xvjf $1 && cd $(basename "$1" .tar.bz2) ;; | |
| *.tar.gz) tar xvzf $1 && cd $(basename "$1" .tar.gz) ;; | |
| *.tar.xz) tar Jxvf $1 && cd $(basename "$1" .tar.xz) ;; | |
| *.bz2) bunzip2 $1 && cd $(basename "$1" /bz2) ;; | |
| *.rar) unrar x $1 && cd $(basename "$1" .rar) ;; | |
| *.gz) gunzip $1 && cd $(basename "$1" .gz) ;; | |
| *.tar) tar xvf $1 && cd $(basename "$1" .tar) ;; |
This file contains hidden or 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
| HOMEBREW_VERSION: 0.9.4 | |
| ORIGIN: https://github.com/mxcl/homebrew | |
| HEAD: edce4ed1223e34b7d4a68eebebc417cb0462ca7d | |
| HOMEBREW_PREFIX: /usr/local | |
| HOMEBREW_CELLAR: /usr/local/Cellar | |
| CPU: 8-core 64-bit sandybridge | |
| OS X: 10.9-x86_64 | |
| Xcode: 5.0 => /Applications/Xcode5-DP5.app/Contents/Developer | |
| GCC-4.2: build 5666 | |
| LLVM-GCC: N/A |
This file contains hidden or 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
| -module(roman_numerals). | |
| -compile(export_all). | |
| % dec_to_roman/1 : integer -> string | |
| % format the integer num using roman numerals | |
| decimal_to_roman(Num) -> | |
| decimal_to_roman(Num, "", | |
| [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1], | |
| ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"]). |
This file contains hidden or 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
| /* | |
| * fifo_q: a macro-based implementation of a FIFO Queue | |
| * | |
| * Copyright (c) 2012 Basho Technologies, Inc. All Rights Reserved. | |
| * Author: Gregory Burd <[email protected]> <[email protected]> | |
| * | |
| * This file is provided to you under the Apache License, | |
| * Version 2.0 (the "License"); you may not use this file | |
| * except in compliance with the License. You may obtain | |
| * a copy of the License at |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2013, all rights reserved by Gregory Burd <[email protected]> | |
| * | |
| * This Source Code Form is subject to the terms of the Mozilla Public License, | |
| * version 2 (MPLv2). If a copy of the MPL was not distributed with this file, | |
| * you can obtain one at: http://mozilla.org/MPL/2.0/ | |
| * | |
| * NOTES: | |
| * - on some platforms this will require -lrt | |
| */ |
This file contains hidden or 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
| %% -*- coding: utf-8 -*- | |
| %% | |
| %% %CopyrightBegin% | |
| %% | |
| %% Copyright (C) 2013 Gregory Burd. All Rights Reserved. | |
| %% | |
| %% The contents of this file are subject to the Mozilla Public License, | |
| %% Version 2, (the "License"); you may not use this file except in | |
| %% compliance with the License. You should have received a copy of the | |
| %% Mozilla Public License along with this software. If not, it can be |