Patents

End intellectual property

Share

Anonymity

No one can be relied on to speak truthfully and candidly if under his true name connected to job that can be destroyed and face that can be beaten in {…and family that can be assaulted}. Jim

There are very few moments in a man’s existence when he experiences so much hostility, or meets with so little benevolence, as when he challenges fashionable perceptions of race. –La Griffe du Lion

Steve Sailer wishes he chose a pseudonym

You have a right to anonymity

Pseudonymity

A digital pseudonymous economy

Share

Java Web Start

Configure server

Configure the web server so that files with the .jnlp extension are set to the application/x-java-jnlp-file MIME type.

Sign Jar File

keytool -genkey -keystore JWSKeystore -alias mbcladwell

keytool -importkeystore -srckeystore JWSKeystore -destkeystore JWSKeystore -deststoretype pkcs12

keytool -selfcert -alias mbcladwell -keystore JWSKeystore

keytool -list -keystore JWSKeystore

jarsigner -keystore JWSKeystore ./temp/bllmlkg-0.12.jar mbcladwell

Diagnosis

keytool -keystore JWSKeystore -list -v

Transfer jar and .jnlp file to the web folder.

Launch

Launch

Clear cache

On Debian with icedtea the cach is at ~/.cache/icedtea-web/cache

$itweb-setting for a control panel like manager

/#javaws -Xclearcache to clear at the command line

or
$rm -rf /home/mbc/.cache/icedtea-web/cache/*

to remove content; don’t delete the cache directory

Diagnose problems

ls -l /usr/bin/java /usr/bin/javaws
ls -l /etc/alternatives/java /etc/alternatives/javaws
dpkg –list openjdk-8* icedtea-8*

update-alternatives –install “/usr/bin/javaws” “javaws” “/opt/java/64/jre1.8.0_161/bin/javaws” 1
update-alternatives –set javaws /opt/java/64/jre1.8.0_161/bin/javaws
update-alternatives –list javaws

2019-06-26 had to install icedtea-netx to get the javaws functionality

Install on Debian

apt-get install icedtea-netx

Share

Cocktails

The back cover of Cook’s Illustrated, November 2018, displays standard cocktails any mixologist should be familiar with:

Manhattan

2 Buffalo Trace Kentuckey Bourbon Whiskey
1 Sweet vermouth
Dash of bitters
Over ice

Pisco Sour

Mint Julep

Margarita

Mai-Tai

Old Fashioned

2 Buffalo Trace Kentuckey Bourbon Whiskey
0.5 Simple Syrup
Dash of bitters
over ice

Negroni

1 oz. Robust London Dry Gin like Tanqueray or Beefeater
1 oz. Cochi Vermouth di Torino
1 oz. Campari

Some history of the Negroni.
Featured at Uncouth Reflections

Tom Collins

Champagne Cocktail

Bloody Mary

Martini

Share

Unemployed men are trouble

Andrew Yang, 2020 democratic presendential hopeful, prognosticates on UBI, automation, and gives some realtalk on the differences between men and women:

…I will say that if you dig into the data, you find that men and women experience idleness differently. …Women who are idle, I believe, would very, very naturally adopt this project-based approach that you’re talking about. The data shows that women who are out of work get involved in the community and go back to school and do things that are quite productive and pro-social. Whereas, men who are out of work spend 75 percent of their time on the computer playing videogames and surfing porn—and then tend to devolve into substance abuse and self-destructive behaviors. Men who are out of work volunteer less than employed men, even though they have more time. And so, men and women seem to experience idleness differently…

What will happen to truck drivers?

Share

Bloatware

Software disenchantment

Share

Postgresql

Current version is 10.5
username and password are ‘postgres’

Installation

#apt-get update
$#apt-get install postgresql postgresql-client

Server setup

$ip addr show //from server
192.168.1.7/24

$ip addr show //from client
192.168.1.9/24

https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

nano /etc/postgresql/11/main/pg_hba.conf

# Allow any user from host 192.168.12.10 to connect to database
# “postgres” if the user’s password is correctly supplied.
#
# TYPE DATABASE USER ADDRESS METHOD
host postgres all 192.168.1.9/24 trust

  • Must reload configuration after this modification:

su - postgres
/usr/lib/postgresql/10/bin/pg_ctl reload

OR

root@cellar:/home/mbc# pg_ctlcluster 11 main restart

OR

SELECT pg_reload_conf(); from psql

  • Must modify postgresql.conf to listen for all addresses

# grep listen /etc/postgresql/10/main/postgresql.conf
listen_addresses = ‘localhost’

#nano /etc/postgresql/10/main/postgresql.conf

# grep listen /etc/postgresql/10/main/postgresql.conf
listen_addresses = ‘*’

Must restart server after this modification

#/usr/lib/postgresql/10/bin/pg_ctl restart -D “/etc/postgresql/10/main”
OR

root@cellar:/home/mbc# pg_ctlcluster 11 main restart

# 2021 March sudo systemctl stop postgresql@11-main to stop

Client setup

#apt-get update
#apt-get install postgresql-client

$ping 192.168.1.7

be sure to get a response

# psql -U postgres -h 192.168.1.7
Welcome to psql 8.1.11 (server 8.4.18), the PostgreSQL interactive terminal.
postgres=#

Extensions

Extensions can be loaded by superuser only.
Extensions can be used by loader only.
Make a regular user a superuser, load extension, revoke superuser status.

su postgres
psql
alter role user_name superuser;
#then create the extension as the user in a different screen
CREATE EXTENSION intarray;
#back to role swapping screen
alter role user_name nosuperuser;

DROP extension; to remove extension

Initialize users/schema

psql -U postgres -h 192.168.1.11 -d lndb

postgres is the superuser
usually there is a database postgres

to see all databases
SELECT datname FROM pg_database;

\du to show all users

Must login as superuser to create a schema

PGbouncer

Needed to terminate artanis persistent connections

Install libevent
Install pgbouncer

./config –prefix=/usr/local
make
#make install

 INSTALL  pgbouncer /usr/local/bin
 INSTALL  README.md /usr/local/share/doc/pgbouncer
 INSTALL  NEWS.md /usr/local/share/doc/pgbouncer
 INSTALL  etc/pgbouncer.ini /usr/local/share/doc/pgbouncer
 INSTALL  etc/userlist.txt /usr/local/share/doc/pgbouncer
 INSTALL  doc/pgbouncer.1 /usr/local/share/man/man1
 INSTALL  doc/pgbouncer.5 /usr/local/share/man/man5

pgbouncer runs on a different port, so start it up in a terminal each session

$pgbouncer -d ./syncd/pgbouncer.ini
$psql -U ln_admin -p 6432 -d lndb -h 127.0.0.1

note the port

[pgbouncer.ini] []
1
2
3
4
5
6
7
8
9
10
lndb = host=127.0.0.1 port=5432 dbname=lndb

[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = trust
auth_file = /home/mbc/syncd/userlist.txt
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = ln_admin
[userlist.txt] []
1
2
"ln_admin" "welcome"

init.el

;_____________________________________________________________________________
;;;;SQLi setup

(require ‘sqlup-mode)
;; Capitalize keywords in SQL mode
(add-hook ‘sql-mode-hook ‘sqlup-mode)
;; Capitalize keywords in an interactive session (e.g. psql)
(add-hook ‘sql-interactive-mode-hook ‘sqlup-mode)
;; Set a global keyword to use sqlup on a region
(global-set-key (kbd “C-c u”) ‘sqlup-capitalize-keywords-in-region)

(setq sql-postgres-login-params
‘((user :default “postgres”)
(database :default “postgres”)
(server :default “192.168.1.7”)
(port :default 5432)))

(add-hook ‘sql-interactive-mode-hook
(lambda ()
(define-key sql-mode-map ‘[f5] ‘sql-send-region)
(toggle-truncate-lines t)))

to launch: M-x sql-postgres

Share

Gradle notes

Use the local Maven repository

1
2
3
4
5
6
7
8
9
10
11
12
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
// maven {
// url 'http://m2.objectdb.com'
// }
mavenLocal()
mavenCentral()


}
1
2
3
4
dependencies {
//.......
compile 'net.stihie:llm:0.1'
}

gradle build –refresh-dependencies

Include other jars in the dependencies. Define the variable extraLibs

1
2
3
configurations {
extraLibs
}

In the dependencies, add the jars to extraLibs:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

dependencies {
// This dependency is found on compile classpath of this component and consumers.
compile 'com.google.guava:guava:23.0'
extraLibs group: 'com.google.guava', name: 'guava', version: '23.0'

extraLibs group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
configurations.compile.extendsFrom(configurations.extraLibs)
// Use JUnit test framework
testCompile 'junit:junit:4.12'
//compile files("objectdb-2.7.5/bin/converter.jar")

// PostgreSQL:
compile(group: 'org.postgresql', name: 'postgresql', version: '42.2.5')
implementation(group: 'org.postgresql', name: 'postgresql', version: '42.2.5')
//Help system
// compile 'javax.help:javahelp:2.0.05'
// implementation 'javax.help:javahelp:2.0.05'
compile 'javax.swing:jlfgr:1.0'
implementation 'javax.swing:jlfgr:1.0'
extraLibs group: 'javax.swing', name: 'jlfgr', version: '1.0'

// compile 'net.stihie:bllm:0.1'
// implementation 'net.stihie:bllm:0.1'
// compile 'javax.swing:jnlp:1.0'
// implementation 'javax.swing:jnlp:1.0'

//JSON parsing
compile 'com.google.code.gson:gson:2.8.5'

//QR code library
// compile 'com.google.zxing:core:3.3.3'
// implementation 'com.google.zxing:core:3.3.3'
// compile 'com.google.zxing:javase:3.3.3'
// implementation 'com.google.zxing:javase:3.3.3'

}

Show contents of the cache:

1
2
3
task showMeCache doLast{
configurations.compile.each { println it }
}
1
2
3
4
5
task refreshLicense(type: Copy) {
from("/home/mbc/LitecoinLicenses/license/DkFzn23a")
into(".")
include("*.ser")
}
1
2
3
task myJavadocs(type: Javadoc) {
source = sourceSets.main.allJava
}
1
2
3
4
5
6
7
8
task copyJavaDocsToWeb(type: Copy, dependsOn: [myJavadocs]) {
// from configurations.runtime
from("build/docs/.")
into("/home/mbc/pm/public")
include('*.html', '*.js', '*.js')
include('javadoc/**')

}

task getDeps(type: Exec) {
configurations.testRuntime.files
commandLine ‘echo’, ‘Downloaded all dependencies’
}

//update the local Maven repository
task updateMaven(type: Exec) {

executable "mvn"
args "install:install-file", "-Dfile=/home/mbc/Downloads/postgresql-42.2.5.jar", "-DgroupId=org.postgresql", "-DartifactId=postgresql", "-Dversion=42.2.5", "-Dpackaging=jar"

// args “install:install-file”, “-Dfile=/home/mbc/Downloads/poi-bin-4.0.1-20181203/poi-4.0.1/poi-ooxml-4.0.1.jar”, “-DgroupId=org.apache”, “-DartifactId=poi-ooxml”, “-Dversion=4.0.1”, “-Dpackaging=jar”

// args “install:install-file”, “-Dfile=build/libs/pm-0.1.jar”, “-DgroupId=net.stihie”, “-DartifactId=pm”, “-Dversion=0.1”, “-Dpackaging=jar”

}

task makeHelp(type: Copy, dependsOn: [copyJavaDocsToWeb, copySchemaDocsToWeb]){

}

task getDeps(type: Exec) {
configurations.testRuntime.files
commandLine ‘echo’, ‘Downloaded all dependencies’
}

//update the local Maven repository
task updateMaven(type: Exec) {

executable "mvn"
args "install:install-file", "-Dfile=/home/mbc/Downloads/postgresql-42.2.5.jar", "-DgroupId=org.postgresql", "-DartifactId=postgresql", "-Dversion=42.2.5", "-Dpackaging=jar"

// args “install:install-file”, “-Dfile=/home/mbc/Downloads/poi-bin-4.0.1-20181203/poi-4.0.1/poi-ooxml-4.0.1.jar”, “-DgroupId=org.apache”, “-DartifactId=poi-ooxml”, “-Dversion=4.0.1”, “-Dpackaging=jar”

// args “install:install-file”, “-Dfile=build/libs/pm-0.1.jar”, “-DgroupId=net.stihie”, “-DartifactId=pm”, “-Dversion=0.1”, “-Dpackaging=jar”

}

1
2
3
4
5
6
7
8
task initializePostgres(type:Exec) {

executable '/usr/bin/psql -U postgres -h 192.168.1.11'
args '-f ~/syncd/prog/plate-manager/pm/postgres/create_tables.sql'
outputs.upToDateWhen { false }


}
1
2
3
4
5
task refreshLicense(type: Copy) {
from("/home/mbc/LitecoinLicenses/license/DkFzn23a")
into(".")
include("*.ser")
}

JavaDocs and Schema

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
task myJavadocs(type: Javadoc) {
source = sourceSets.main.allJava
}


task copyJavaDocsToWeb(type: Copy, dependsOn: [myJavadocs]) {
// from configurations.runtime
from("build/docs/.")
into("/home/mbc/syncd/labsolns/public")
include('*.html', '*.js', '*.js')
include('javadoc/**')

}


task getSchema(type: JavaExec) {
main = "-jar";
args "/home/mbc/temp/schemaspy/schemaspy-6.1.0-SNAPSHOT.jar","-configFile", "/home/mbc/temp/schemaspy/schemaspy.properties","-dp","/home/mbc/temp/schemaspy/postgresql-42.2.5.jar"
}

task copySchemaDocsToWeb(type: Copy, dependsOn: [getSchema]) {
// from configurations.runtime
from("./output")
// include('*.html', '*.js', '*.css','*.png','*.txt','*.xml')
into("/home/mbc/syncd/labsolns/public/schema")


}

task makeHelp(type: Copy, dependsOn: [copyJavaDocsToWeb, copySchemaDocsToWeb]){

Prep the development environment

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
task prep {
doLast{

exec{
commandLine 'git', 'pull'
}
exec{
workingDir '../postgres'
commandLine 'git', 'pull'

}
exec{
workingDir '/home/mbc'
// commandLine 'gnome-terminal psql -U pm_admin -h 192.168.1.7 -d pmdb'
commandLine 'gnome-terminal', '--command=/usr/bin/psql -U ln_admin -h 192.168.1.11 -d lndb'
}
//exec{
// workingDir '/home/mbc'
// commandLine 'psql','-Upm_admin', '-h192.168.1.7', '-dpmdb'
//}
exec{
commandLine 'gnome-terminal','--command=emacs'
}

}

}
Share

Bitcoin/Litecoin License Manager plug-in

Before using the plugin, you need to generate license.ser files. Learn how to here.

The BLLM plug-in is the code you will integrate into your software, likely making it available as a menu item under “Help/License”.

The workflow for obtaining a license looks like this:

Download BLLM from Github

Github link here.

Note that the license file has to be handled separately. Generate a license file with the Bitcoin/Litecoin License Manager License Key Generator and include the license in your programs installation directory or another directory of your choosing. Users will need read write access to the directory containg the license.ser file. The license file license.ser should NOT be packaged in your applications jar file.

Integrate BLLM into your application

Provide a menu item that will launch BLLM:

In the ActionListener of your menu item, launch the main window for BLLM

MenuForMyApplication.java
1
2
3
4
5
6
7
8
9
10

menuItem = new JMenuItem("License", KeyEvent.VK_L);
menuItem.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
new bllm.DialogLicenseManager( "My Apps Title", "/path/to/license.ser", "privatekeyforencryption");
}
});
menu.add(menuItem);

If you are working with Gradle, you can install BLLM in your local repository and make BLLM a dependency. First add to the local repository:

1
2
>mvn install:install-file -Dfile=build/libs/bllm-0.1.jar -DgroupId=net.stihie -DartifactId=bllm -Dversion=0.1 -Dpackaging=jar

Check your ./.m2 directory and be sure it is there. Then in your gradle.build file:

gradle.build
1
2
3
4
5
6
7
8
9
repositories {
//....
mavenLocal()
}

dependencies {
//.......
compile 'net.stihie:bllm:0.1'
}

Javadocs available here.

Share