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 / netlicensing-csharp-release.yml
Created September 1, 2020 12:23
GitHub Actions - NetLicensing C# Client - Relese workflow
name: NetLicensing C# Client - Release
on:
workflow_run:
workflows: ["NetLicensing C# Client - CI"]
branches: [ master ]
types:
- completed
jobs:
@r-brown
r-brown / netlicensing-csharp-ci.yml
Created September 1, 2020 12:23
GitHub Actions - NetLicensing C# Client - CI workflow
name: NetLicensing C# Client - CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
'use strict';
const https = require('https');
const http = require('http');
const $url = require('url');
const querystring = require('querystring');
const CORS_HEADERS = {
'Access-Control-Allow-Methods': 'OPTIONS,POST',
'Access-Control-Allow-Headers': 'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token',
// 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')
// In the Wiki Edit (/_edit) Preview mode, run this snippet in the browser console to get a Markdown of a Table of Contents:
console.log(
'**Table of Contents**\n\n' +
Array.from(document.querySelectorAll('h1 > a, h2 > a, h3 > a')).map((a) => (
{'H1':'* ','H2':' * ','H3':' - '}[a.parentNode.tagName] +
`[${a.parentNode.innerText.trim()}](${a.hash})`
)).join('\n') +
'\n\n' + '***'
);
# Use browser developer console to verify DOM element selector
document.querySelector('section#stay-up-to-date-with-netlicensing-platform-news p.change-description')
<?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
#!/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)
@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
@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"