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
/<event date=/{ TIME=substr($0,13,15)} | |
{if (NF>5) | |
printf("%s,%s,%s,%s,%s,%s,%s,\"%s %s %s\"\n",TIME,$1,$2,$3,$4,$5,$6,$7,$8,$9,$10)} |
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
# Example AWK script | |
# echo -e '1 2 3\n4 5 6\n10.11.12'| awk -v DATE=$(date "+%m%d%y") -f t1.awk | |
# | |
/[0-9]*\.[0-9]*\./ { n=split($1,a,"."); print n " values in s" } | |
{ | |
if (NR==1) {print $1 " Rec number: " NR " Fields " NF} | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
double Plus (double a, double b) { return a+b; } | |
double Mult (double a, double b) { return a*b; } | |
double Minus (double a, double b) { return a-b; } | |
double Div (double a, double b) { return a/b; } | |
void SF(double a, double b, double (*ptF)(double, double)) | |
{ |
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/bash | |
# | |
# | |
# Replace Pa33Word with something more secure | |
PASSWORD=Pa33Word | |
DIRECTORY=secretBooks | |
# | |
# | |
tar -zcf - ${DIRECTORY}|openssl des3 -salt -k ${PASSWORD} | dd of=${DIRECTORY}.tar.gz.des3 | |
# |
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
# | |
# | |
# Sample /Users/mchirico/.fetchmailrc file for 2 Gmail accounts | |
# | |
# Check mail every 90 seconds | |
set daemon 90 | |
set syslog | |
set postmaster mchirico | |
#set bouncemail | |
# |
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
int myURLget() { | |
NSString *urlAsString = @"https://mchirico.appspot.com"; | |
urlAsString = [urlAsString stringByAppendingString:@"?param1=First"]; | |
urlAsString = [urlAsString stringByAppendingString:@"¶m2=Second"]; | |
NSURL *url = [NSURL URLWithString:urlAsString]; | |
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
/* | |
The MIT License (MIT) | |
Copyright (c) 2013 Mike Chirico mchirico@gmail.com | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, |
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
/* | |
An example of mmap where data is modified in the file. This | |
version currently compiles on Mac OSX. | |
References: | |
Advanced Programming in the UNIX® Environment, Third Edition | |
By: W. Richard Stevens; Stephen A. Rago | |
Publisher: Addison-Wesley Professional |
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
// | |
// cwxstatViewController.m | |
// mymm | |
// | |
// Created by Mike Chirico on 4/4/13. | |
// Copyright (c) 2013 Mike Chirico. All rights reserved. | |
// | |
#import "cwxstatViewController.h" |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"os/exec" | |
"bytes" | |
"reflect" | |
) |