This is a local copy of the commands from:
- http://www.jmknoble.net/keys/#master-key
- http://www.macfreek.nl/mindmaster/Convert_GPG_keys_to_subkeys
- Bootable offline cd with gpg: http://tails.boum.org
| #!/usr/bin/env ruby | |
| #------------------------------------------------------------------------------ | |
| # Aggregate Print useful information from /proc/[pid]/smaps | |
| # | |
| # pss - Roughly the amount of memory that is "really" being used by the pid | |
| # swap - Amount of swap this process is currently using | |
| # | |
| # Reference: | |
| # http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361 |
| auth_basic "Restricted"; | |
| auth_basic_user_file /etc/nginx/htpasswd; |
This is a local copy of the commands from:
| require "mkmf" | |
| $libs += " -lstdc++ " | |
| create_makefile("human") |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| #!/bin/bash | |
| # snapshot the previous volume before updating | |
| # otherwise there will be a CoW for each child, which could get slow quickly | |
| btrfs subvolume snapshot /btrfs/base/precise-amd64-2013-04-01 /btrfs/base/precise-amd64-2013-04-31 | |
| # differential copy --inplace avoids the tempfile/mv so large files can remain shared | |
| rsync -avx --inplace --delete server.domain.com::precise-amd64 /btrfs/base/precise-amd64-2013-04-31 | |
| # now make a snapshot for an app |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/mman.h> | |
| #ifndef MAP_32BIT | |
| #error "MAP_32BIT not defined" | |
| #endif | |
| struct scope | |
| { |
| require 'jruby' | |
| module Serialize | |
| def self.serialize(obj) | |
| baos = java.io.ByteArrayOutputStream.new | |
| oos = java.io.ObjectOutputStream.new(baos) | |
| oos.write_object(JRuby.reference(obj)) | |
| oos.close | |
| obj-m += rootkit.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
| #cribbed from http://vimeo.com/52569901 (Twilio carrier call origination moderation) | |
| # The idea is that many fan-in queues can enqueue at any rate, but | |
| # dequeue needs to happen in a rate-controlled manner without allowing | |
| # any individual input queue to starve other queues. | |
| # http://en.wikipedia.org/wiki/Leaky_bucket (second sense, "This version is referred to here as the leaky bucket as a queue.") | |
| # | |
| # requires: | |
| # redis 2.6+ | |
| # redis-py>=2.7.0 | |
| # anyjson |