Skip to content

Instantly share code, notes, and snippets.

@jwhb
jwhb / asadmin-jdbcrealm.sh
Last active January 20, 2017 08:56
Creating a JDBC Security Realm with Asadmin and Derby
# The following asadmin command creates a JDBC Security Realm. It was created with a Derby database in mind, thus all table and column names are in uppercase. For non-Derby databases you might need to respect the actual cases.
asadmin create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm --property user-name-column=USERNAME:password-column=PASSWORD:digestrealm-password-enc-algorithm=none:group-name-column=GROUPNAME:group-table=USERS_GROUPS:user-table=USERS:datasource-jndi=jdbc/myapp-ds:jaas-context=jdbcRealm:db-user=admin:db-password=admin:digest-algorithm=none:group-table-user-name-column=USERNAME jdbcRealm
@jwhb
jwhb / keybase.md
Last active November 22, 2020 22:45

Keybase proof

I hereby claim:

  • I am jwhb on github.
  • I am jwhy (https://keybase.io/jwhy) on keybase.
  • I have a public key whose fingerprint is 0A90 2DEE 61AD 62B8 6970 5333 8300 84A3 9E8E 3A97

To claim this, I am signing this object:

@jwhb
jwhb / README.md
Last active March 1, 2021 20:49
MSC1937 16-Digit Segment Display Arduino Sketch

Pin connections: Fritzing Circuit

@jwhb
jwhb / MagicSwitch.php
Last active December 28, 2015 08:29
PHP switch structure that fills an array with default values up to a specific index
<?php
$params = array('users', 'JWhy', 'repositories');
$n_params = sizeof($params);
switch($n_params){
case 0:
die('Not enough information supplied');
break;
case 1:
$params[1] = '';
@jwhb
jwhb / dbo_rss.php
Last active February 4, 2023 02:05
A PHP script that creates a RSS feed containing the latest builds on dl.bukkit.org
<?php
/**
* Bukkit Build RSS Generator
*
* @version 0.3
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License
*/
/* Channel configuration */