Skip to content

Instantly share code, notes, and snippets.

View cschamp's full-sized avatar

Craig Schamp cschamp

  • Boise, Idaho
  • 14:45 (UTC -06:00)
View GitHub Profile
<type 'dict'>
<type 'instance'>
{'source': 'foo'}
Source is 'foo'
Traceback (most recent call last):
File "pyscope.py", line 21, in <module>
main()
File "pyscope.py", line 18, in main
print r"Source is '%(source)s'" % options
AttributeError: Values instance has no attribute '__getitem__'
#include <openssl/evp.h>
unsigned char *
sha1digest(unsigned char *buf, unsigned int len, unsigned int *olen)
{
EVP_MD_CTX ctx;
const EVP_MD *md;
unsigned char *retval;
if (buf == NULL) {
dtrace -n 'syscall::open:entry{printf("%s",execname);}'
// Demonstrates how to pipe a program from memory to Python interpreter.
// Adapted from http://borkware.com/quickies/one?topic=NSTask
#import <Foundation/Foundation.h>
static const char *prog = "print \"Hello, world!\";";
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
map g 1G
map e $
map - :n#^M
map , !}fmt -c^M
map ; !}fmt -c -w 57^M
set ai
set aw
bld() {
case `hostname` in
cschamp-zr1*)
make -C /usr/local/build/git/hosted09/bora-vmsoft VERBOSE=0 OBJDIR=release $1 2>&1 |tee $1.log
;;
*)
LOCAL skipto(endch)
REG CHAR endch;
{
/* skip chars up to } */
REG CHAR c;
WHILE (c=readc()) ANDF c!=endch
DO SWITCH c IN
case SQUOTE: skipto(SQUOTE); break;
int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\
o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}
/*
* int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\
* o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}
*/
int i;
main()
{
for(; i["]<i;++i){--i;}"]; read('-'-'-',i+++"hello, world!\n",'/'/'/'))
if [[ $OSTYPE == darwin* ]] ; then PCOLOR=yellow
else PCOLOR=red
fi
PROMPT="%{$fg_no_bold[green]%}%24<..<%~%{$fg_no_bold[default]%} %(2L!%#%#!%#) "