Skip to content

Instantly share code, notes, and snippets.

View joewiz's full-sized avatar

Joe Wicentowski joewiz

  • Arlington, Virginia
View GitHub Profile
//
// Phoneme.swift
import Foundation
class Phoneme {
private var isAVowelPhoneme = false;
private var phoneme = "";
@ryansb
ryansb / check_ssl_expiry.py
Created January 7, 2016 22:53
Check expiring certificates
import datetime
import logging
import socket
import ssl
YOUR_DOMAIN = 'serverlesscode.com'
WARNING_BUFFER = 14
logger = logging.getLogger()
logger.setLevel(logging.INFO)
@CliffordAnderson
CliffordAnderson / books.csv
Last active May 26, 2020 16:32
Some books
Author Title ISBN Binding Year Published
Jeannette Walls The Glass Castle 074324754X Paperback 2006
James Surowiecki The Wisdom of Crowds 9780385503860 Paperback 2005
Lawrence Lessig The Future of Ideas 9780375505782 Paperback 2002
Larry Bossidy, Ram Charan, Charles Burck Execution 9780609610572 Hardcover 2002
Kurt Vonnegut Slaughterhouse-Five 9780791059258 Paperback 1999
Haruki Murakami After the Quake 9780375413902 Paperback 2003
Nassim Nicholas Taleb Fooled by Randomness 9781587991905 Paperback 2005
Robert A. Dahl On Democracy (Yale Nota Bene) 9780300194463 Paperback 2000
Daniel Defoe A Journal of the Plague Year 9780140430158 Paperback 2001
@adamretter
adamretter / anon-recursion.xqy
Created September 18, 2015 14:01
Anonymous function recursion in XQuery
xquery version "3.0";
(:~
: Anonymous function recursion in XQuery
:
: @author Adam Retter <[email protected]>
:)
let $factorialHelper := function($f, $x) {
if($x eq 0) then
@jeffreycwitt
jeffreycwitt / gist:cb4ab709db98f1317d4b
Created May 16, 2015 20:57
A ruby script to auto load git repos into webdav mounted exist volume
#!/usr/bin/env ruby
require 'bundler/setup'
require 'lbp'
puts "welcome to the scta index loader"
puts "i'm going to help you load git repos into the existdb database"
local_load_dir = "/Volumes/db-1/apps/scta/"
remote_load_dir = "/Volumes/db/apps/scta/"
use_load_dir = remote_load_dir
@CliffordAnderson
CliffordAnderson / say-howdy.xqy
Created March 27, 2015 17:29
A working example of the Say-Howdy function
xquery version "3.0";
declare function local:say-howdy ($name as xs:string*) as xs:string
{
if (fn:count($name) >1) then "Howdy, " || fn:string-join($name, " and ") || "!"
else "Howdy, " || $name || "!"
};
(: local:say-howdy("Dave") :)
local:say-howdy(("Dave", "Laura"))
@CliffordAnderson
CliffordAnderson / comp.R
Last active August 29, 2015 14:17
Compare the annual GDP growth in China and the United States
# Load libraries
library(ggplot2)
library(Quandl)
# Load datasets from Quandl
USA <- Quandl("WORLDBANK/USA_NY_GDP_MKTP_KD_ZG", authcode="[TOKEN")
China <- Quandl("WORLDBANK/CHN_NY_GDP_MKTP_KD_ZG", authcode="[TOKEN")
# Merge datasets into single table
Comp <- China
@wsalesky
wsalesky / facets.xqm
Created February 6, 2015 18:49
XQuery Facets POC
xquery version "3.0";
(:~
: A facet library module
:
: Builds facets from nodes passed by search or browse modules.
: Uses group by
: Built for use with eXistdb, if using with eXistdb be sure to define your range
: indexes in your collectio.xconf file for best performance.
:
: @author Winona Salesky
@CliffordAnderson
CliffordAnderson / cities.xqy
Last active August 29, 2015 14:14
IE-TN Data
xquery version "3.0";
<cities>{
let $names :=
"Adelaide
Adelaide
Adelaide and Windsor
Adelaide Station
Agangarrive Hill
Aghadovey
Aghadowey
@RobTrew
RobTrew / ParseAllOPMLAttributes.js
Last active May 11, 2024 06:49
PARSE LOCAL OPML FILE IN OS X 10.10 JXA USING $.NSXMLDocument (parsing 'text' + all other attributes)
// PARSE LOCAL OPML FILE IN OS X 10.10 JXA USING $.NSXMLDocument
// Ver 2.0 Parse all attributes (ver 1 just parsed text)
function run() {
var app = Application.currentApplication();
app.includeStandardAdditions = true;
function readTextFromFile(strPath) {
return $.NSString.stringWithContentsOfFile(strPath);
}