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
// Copyright 2013 Paul Brewer | |
// License: You may copy this file under the same terms as the MIT License | |
// located at http://opensource.org/licenses/MIT | |
// This file is provided AS IS WITH NO WARRANTY OF ANY KIND. All use is at your own risk. | |
// | |
// Status: July 13, 2013, Paul Brewer: First version. Simple test case passed. It needs to be more extensively tested. | |
// It lacks escaping for odd characters in strings, though a workaround is possible as described in the comments. | |
// | |
// July 14, 2013, Paul Brewer: JSON.stringify() used to stringify basic | |
// types such as string, number, null/undefined. This provides string |
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
#!/usr/bin/python | |
# Copyright 2014 Dr Paul Brewer -- Economic and Financial Technology Consulting LLC | |
# This script is made available under the terms of the MIT LICENSE | |
# Intended as a helper for refactoring template-enhanced html | |
# warning: overwrites existing files. | |
# Does not delete or modify original file templates.html | |
# Thanks to Stack Overflow users for these helpful hints: | |
# use of htmlparser to unescape entities | |
# http://stackoverflow.com/a/21894821/103081 | |
# http://stackoverflow.com/a/663128/103081 |
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
#!/usr/bin/python | |
# Copyright 2014 Dr Paul Brewer | |
# This python file is licensed to the public under the terms of the MIT License | |
# ----- | |
# When redirecting from name.com to www.name.com or from www.name.com to name.com | |
# it is easy to write the NGINX response incorrectly as | |
# return 301 http://name.com/$request_uri | |
# when it should be | |
# return 301 http://name.com$request_uri | |
# For more info see http://stackoverflow.com/a/7958540/103081 |
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 <complex.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// rtlsdr-to-gqrx Copyright 2014 Paul Brewer KI6CQ | |
// License: GNU GPL 3.0 | |
// | |
// IQ file converter for Software Defined Radio Programs rtl_sdr, gqrx | |
// from rtl_sdr recording format -- interleaved unsigned char | |
// to gqrx/gnuradio .cfile playback format -- complex64 |
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
# Copyright 2014 Dr Paul Brewer | |
# Economic and Financial Technology Consulting LLC -- www.eaftc.com | |
# | |
# python script to import CSV to mongoDB via csv.DictReader, pymongo | |
# | |
# You may copy or reuse this script under the terms of the standard MIT License: | |
# | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
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
// HamGridSquare.js | |
// Copyright 2014 Paul Brewer KI6CQ | |
// License: MIT License http://opensource.org/licenses/MIT | |
// | |
// Javascript routines to convert from lat-lon to Maidenhead Grid Squares | |
// typically used in Ham Radio Satellite operations and VHF Contests | |
// | |
// Inspired in part by K6WRU Walter Underwood's python answer | |
// http://ham.stackexchange.com/a/244 | |
// to this stack overflow question: |
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
# Copyright 2015 Paul Brewer Economic and Financial Technology Consulting LLC | |
# Released under the MIT Public License | |
# LICENSE: http://opensource.org/licenses/MIT | |
# Purpose: rationally removes inner commas and inner quotes from csv file fields | |
# Useful for Google BigQuery as of 2015-03 does not support quoted commas in CSV fields | |
# python ./unf |
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
/* replace.c code snippet | |
* Copyright 2015 Dr Paul Brewer Economic and Financial Technology Consulting LLC | |
* License: MIT | |
* http://opensource.org/licenses/MIT | |
*/ | |
#include <ctype.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.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
#!/usr/bin/env python | |
# Copyright 2015 Paul Brewer | |
# This file is open source software | |
# License: The MIT License | |
import re | |
import sys | |
if len(sys.argv)!=3: | |
print 'Usage: ' |
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
#!/usr/bin/env python | |
import json | |
import os | |
print json.dumps(dict(os.environ)) |
OlderNewer