Skip to content

Instantly share code, notes, and snippets.

@colagrosso
colagrosso / 10 ebooks
Last active April 21, 2024 05:42
Sample Ebooks DB records
MariaDB [se]> SELECT * from Ebooks LIMIT 10\G
*************************** 1. row ***************************
EbookId: 1
Identifier: url:https://standardebooks.org/ebooks/ernest-howard-crosby/captain-jinks-hero
Created: 2024-03-03 19:19:48
Updated: 2024-04-20 22:51:57
WwwFilesystemPath: /standardebooks.org/web/www/ebooks/ernest-howard-crosby/captain-jinks-hero
RepoFilesystemPath: /standardebooks.org/ebooks/ernest-howard-crosby_captain-jinks-hero.git
KindleCoverUrl: /ebooks/ernest-howard-crosby/captain-jinks-hero/downloads/thumbnail_c810c85a6d60f2655fd27c36771c3a1b168991d6_EBOK_portrait.jpg
EpubUrl: /ebooks/ernest-howard-crosby/captain-jinks-hero/downloads/ernest-howard-crosby_captain-jinks-hero.epub
@colagrosso
colagrosso / insert-se-table-data.sql
Created December 10, 2023 03:21
Insert SE table data
INSERT INTO Artists (Name, UrlName, DeathYear)
VALUES
('Aaron Douglas', 'aaron-douglas', 1979),
('Abanindranath Tagore', 'abanindranath-tagore', 1951),
('Abbott Handerson Thayer', 'abbott-handerson-thayer', 1921),
('Abraham Manievich', 'abraham-manievich', 1942),
('Abraham Walkowitz', 'abraham-walkowitz', 1965),
('Adolph Menzel', 'adolph-menzel', 1905),
('Adriaen van der Spelt', 'adriaen-van-der-spelt', 1673),
('Adrien Dauzats', 'adrien-dauzats', 1868),
@colagrosso
colagrosso / SuperCSV-CsvBeanReader.patch
Created February 1, 2011 23:12
A patch to SuperCSV-1.52 that allows reading beans with optional values. See http://bit.ly/eUkBb3
--- SuperCSV-1.52-source-orig/src/org/supercsv/io/CsvBeanReader.java 2011-02-01 15:31:39.000000000 -0700
+++ SuperCSV-1.52-source-fixed/src/org/supercsv/io/CsvBeanReader.java 2011-02-01 15:31:48.000000000 -0700
@@ -62,7 +62,7 @@
// map results to the setter methods
for( int i = 0; i < nameMapping.length; i++ ) {
// don't call a set-method in the bean, if there is no result to store
- if( nameMapping[i] == null ) {
+ if( nameMapping[i] == null || lineResult.get(i) == null) {
continue;
}
@colagrosso
colagrosso / LICENSE
Last active March 13, 2016 20:18
Publish CDOT I-70 traffic to SimpleGeo
Copyright (c) 2016 Mike Colagrosso
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@colagrosso
colagrosso / mines.pl
Last active March 15, 2016 23:30
The Mines M
#!/usr/bin/perl -w
use strict;
my$song="helluva"; my$drink="whisky";
my$g="Golden";my$csm ="Tech";my$w="wreck"
;my$demeanor="honest"; my$conscience="clear";
my$a="rambling";my$enemy ="engineer,";my$f="ll";
my$sp=chr(32);my$line ="A";for(1..4){$line
.=$sp.$song.","}$line.= $sp.$song.$sp.$enemy;;
for(1..2){print$line,"\n" ;}$enemy=~tr/,/\./;print
@colagrosso
colagrosso / LICENSE
Last active April 20, 2016 19:55
Makefile to build a .so for LabVIEW
Copyright (c) 2016 Mike Colagrosso
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
// Read AIN0 once a second
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class LogAIN0 {
public static void main(String[] args) {