This file contains 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
n = ((n >> 1) & 0x55555555) | ((n << 1) & 0xaaaaaaaa); | |
n = ((n >> 2) & 0x33333333) | ((n << 2) & 0xcccccccc); | |
n = ((n >> 4) & 0x0f0f0f0f) | ((n << 4) & 0xf0f0f0f0); | |
n = ((n >> 8) & 0x00ff00ff) | ((n << 8) & 0xff00ff00); | |
n = ((n >> 16) & 0x0000ffff) | ((n << 16) & 0xffff0000); |
This file contains 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
/// inserts a series of bits into a byte buffer at the specified bit offset | |
/// @param[in] dst pointer to buffer | |
/// @param[in] src array of data to insert into the dst buffer | |
/// @param[in] len length in bytes of the buffer | |
/// @param[in] offset number of bits to offset the data in the buffer | |
/// @param[in] n number of bits to insert into the buffer | |
void bitops_copy(uint8_t * dst, uint8_t * src, uint32_t len, uint32_t offset, | |
uint32_t n) | |
{ | |
uint32_t byte_required; |
This file contains 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
# | |
# Slapd Daemon Configuration | |
# Copyright (C) 2011 Bindle Binaries <syzdek@bindlebinaries.com>. | |
# | |
# @BINDLE_BINARIES_BSD_LICENSE_START@ | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# |
This file contains 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
-- | |
-- Simple SQLite3 Example | |
-- Copyright (C) 2011 David M. Syzdek <david@syzdek.net> | |
-- | |
-- Run: | |
-- cat hello.sql | sqlite3 hello.db | |
-- | |
-- creates tables |
This file contains 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
dn: o=slapdUsers | |
description: top level tree for administering LDAP access | |
o: slapdUsers | |
objectClass: top | |
objectClass: organization | |
dn: ou=Clients,o=slapdUsers | |
objectClass: top | |
objectClass: organizationalUnit | |
ou: Clients |
This file contains 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
/* | |
* Simple Programming Examples And References | |
* Copyright (C) 2011 David M. Syzdek <david@syzdek.net>. | |
* | |
* @SYZDEK_BSD_LICENSE_START@ | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* |
This file contains 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
/* | |
* Simple Programming Examples And References | |
* Copyright (C) 2011 David M. Syzdek <david@syzdek.net>. | |
* | |
* @SYZDEK_BSD_LICENSE_START@ | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* |
This file contains 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
/************************************************* | |
* PCRE DEMONSTRATION PROGRAM * | |
*************************************************/ | |
/* This is a demonstration program to illustrate the most straightforward ways | |
of calling the PCRE regular expression library from a C program. See the | |
pcresample documentation for a short discussion ("man pcresample" if you have | |
the PCRE man pages installed). | |
In Unix-like environments, if PCRE is installed in your standard system |
This file contains 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/sh | |
# | |
# Convience script for encrypting a SSH user's password | |
# using the user's public SSH RSA key. | |
# | |
# encrypt-sshpass.sh | |
# | |
PROGRAM_NAME=`basename ${0}` |
This file contains 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
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
NSRunLoop * runLoop; | |
CLIMain * main; // replace with desired class | |
@autoreleasepool | |
{ | |
// create run loop |
OlderNewer