Skip to content

Instantly share code, notes, and snippets.

View r-brown's full-sized avatar
🇩🇪
Happy Licensing!

R.Brown r-brown

🇩🇪
Happy Licensing!
View GitHub Profile
@r-brown
r-brown / swid-generator-example01
Last active August 29, 2015 14:12
SWID Tag Generator (example 01)
// prepare SWID Tag processor
SwidProcessor processor = new DefaultSwidProcessor();
((DefaultSwidProcessor) processor).setEntitlementRequiredIndicator(true)
.setProductTitle("NetLicensing")
.setProductVersion("2.1.0", 2, 1, 0, 0)
.setSoftwareCreator("Labs64", "regid.2010-04.com.labs64")
.setSoftwareLicensor("Labs64", "regid.2010-04.com.labs64")
.setSoftwareId("NLIC", "regid.2010-04.com.labs64")
.setTagCreator("Labs64", "regid.2010-04.com.labs64");
@r-brown
r-brown / manager
Created February 28, 2015 11:43
Manager :-)
Customer -> Manager > calculate 1 + 2 = ?
Manager -> Developer > FYI
Developer -> Manager > 3
Manager -> Lead > FYA
Lead -> Manager > how 3 why 3 what 3 ?
Manager -> Developer > FYI
Developer -> Manager > '+' is addition, 1 and 2 are integers
Manager -> Lead > FYA
Lead -> Manager > OK
Manager -> All > calls for a meeting
@r-brown
r-brown / Enable CORS for NetLicensing API (RESTful)
Last active June 17, 2019 04:27
Apache HTTPD configuration - Enable CORS for NetLicensing API (RESTful)
<VirtualHost netlicensing.labs64.com:443>
...
<Location /core>
# CORS withCredentials=false (without cookies)
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type, Accept, Authorization"
Header always set Access-Control-Max-Age: "3600"
@r-brown
r-brown / howto-install-jekyll_homebrew-rbenv.txt
Last active June 12, 2022 15:23
How to install Jekyll using Homebrew and rbenv
# install Homebrew
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# show brew commands
$ brew help
# check current user
$ echo $(whoami)
# grant access to the folders
#!/bin/sh
# Сlear containers:
docker rm -f $(docker ps -a -q)
# Сlear images:
docker rmi -f $(docker images -a -q)
# Remove all the dangling images:
docker rmi $(docker images -q -f dangling=true)
<?php
/**
* @package Creating Tables Boilerplate WordPress Plugin
* @version 1.0
*/
/*
Plugin Name: Creating Tables Boilerplate WordPress Plugin
Plugin URI: https://praison.com/
Description: Creating Tables Boilerplate WordPress Plugin
Author: Mervin Praison
# Use browser developer console to verify DOM element selector
document.querySelector('section#stay-up-to-date-with-netlicensing-platform-news p.change-description')
// 1) Open website
// e.g. https://netlicensing.io
// 2) Open browser console
// - Firefox: Tools > Web Developer > Web Console
// - Chrome: More Tools > Developer Tools
// - Safari: Develop > Show JavaScript Console
// 3) Load GuideChimp scripts and styles
fetch('https://io.labs64.com/GuideChimp/docs/samples/bootstrap-browser-console.js')
@henryean
henryean / swid-generator-example
Created April 24, 2020 08:04
SWID Tag Generator Example
DefaultSwidProcessor processor = new DefaultSwidProcessor();
processor.setGenerator(new SequentialIdGenerator(0, 1, "e", null));
processor.setName("NetLicensing")
.setVersion("2.1.0")
.setVersionScheme(VersionScheme.UNKNOWN)
.setSupplemental(true)
.addEntity(new EntityBuilder().name("Labs64")
.role("softwareCreator")
.role("softwareLicensor")
.role("tagCreator")