$ gpg --gen-key
$ gpg --list-secret-keys
#!/usr/bin/env python | |
import logging as log | |
from fileinput import input | |
from collections import namedtuple, defaultdict | |
from pprint import pprint | |
if __debug__: | |
log_level = log.DEBUG | |
else: |
# setting up irq affinity according to /proc/interrupts | |
# 2008-11-25 Robert Olsson | |
# 2009-02-19 updated by Jesse Brandeburg | |
# | |
# > Dave Miller: | |
# (To get consistent naming in /proc/interrups) | |
# I would suggest that people use something like: | |
# char buf[IFNAMSIZ+6]; | |
# | |
# sprintf(buf, "%s-%s-%d", |
#!/usr/bin/perl | |
# The above line may need to be changed to point at your version of Perl | |
# | |
# This script attempts to find malicious files/scripts on your machine. | |
# It specifically looks for spambots that we're aware of, as well | |
# as "suspicious" constructs in various scripting languages. | |
# | |
# Normally it should be run as root. | |
# | |
# By default, findbot.pl scans the directories /tmp, /usr/tmp, /home and |
#include <stdio.h> | |
int example(int a, int b) { | |
return a + b + 3; | |
} | |
int main(void) { | |
printf("%i\n", example(1, 2)); | |
return 0; | |
} |
There are some tests ripped out from git://repo.or.cz/ltp-debian.git/testcases/open_posix_testsuite/conformance/interfaces and made self-containing. They demonstrate and can be used to test the POSIX AIO interface for asynchronous I/O and formerly file IO.
Build with a c compiler (for instance clang
or cc
):
cc -o aio_read-test aio_read-test.c && ./aio_read-test
Note: Contrary to popular belief, it has been tested and confirmed to actually be asynchronous on Darwin 10.6.0 (xnu 1504.9.26~3).
/* | |
C socket server example, handles multiple clients using threads | |
Compile | |
gcc server.c -lpthread -o server | |
*/ | |
#include<stdio.h> | |
#include<string.h> //strlen | |
#include<stdlib.h> //strlen | |
#include<sys/socket.h> |
/** | |
Handle multiple socket connections with select and fd_set on Linux | |
Silver Moon ( [email protected]) | |
*/ | |
#include <stdio.h> | |
#include <string.h> //strlen | |
#include <stdlib.h> | |
#include <errno.h> |
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <string.h> | |
struct entry_s { | |
char *key; | |
char *value; |
The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.