Skip to content

Instantly share code, notes, and snippets.

View noyb34's full-sized avatar
🎯
Focusing

Patrick R noyb34

🎯
Focusing
  • Global
View GitHub Profile
@noyb34
noyb34 / Collection+JSON
Created September 26, 2022 22:47 — forked from soofaloofa/Collection+JSON
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
GET https://api.example.com/player/1234567890
{
"collection": {
"version": "1.0",
"href": "https://api.example.com/player",
"items": [
{
"href": "https://api.example.com/player/1234567890",
"data": [
{"name": "playerId", "value": "1234567890", "prompt": "Identifier"},
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
@noyb34
noyb34 / q_example.js
Created March 1, 2021 22:03 — forked from jeffcogswell/q_example.js
Here's another chaining example on using q.js. This doesn't have any error handling, as I just want to demonstrate the chaining concept. Please read the comments carefully, as I start out with a non-q example, to show the order of flow. Please post comments if there's anything that isn't clear and I'll try to revise it as needed.
// Q sample by Jeff Cogswell
/*===========
We want to call these three functions in sequence, one after the other:
First we want to call one, which initiates an ajax call. Once that
ajax call is complete, we want to call two. Once two's ajax call is
complete, we want to call three.
BUT, we don't want to just call our three functions in sequence, as this quick
@noyb34
noyb34 / soundex.js
Created January 25, 2021 15:03 — forked from shawndumas/soundex.js
Soundex in JavaScript
var soundex = function (s) {
var a = s.toLowerCase().split(''),
f = a.shift(),
r = '',
codes = {
a: '', e: '', i: '', o: '', u: '',
b: 1, f: 1, p: 1, v: 1,
c: 2, g: 2, j: 2, k: 2, q: 2, s: 2, x: 2, z: 2,
d: 3, t: 3,
l: 4,
@noyb34
noyb34 / schemacrawler-sqlite-macos-howto.md
Created February 24, 2020 14:28 — forked from dannguyen/schemacrawler-sqlite-macos-howto.md
How to use schemacrawler to generate schema diagrams for SQLite from the commandline (Mac OS)
@noyb34
noyb34 / elasticsearch-cheatsheet.txt
Created February 20, 2020 20:42 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
@noyb34
noyb34 / docker-compose.yml
Created October 27, 2017 16:24 — forked from cmoore4/docker-compose.yml
Docker-Compose Auto-Scale with Nginx Upstreams
nginx:
image: myclient/nginx
environment:
- HOSTHOST=UBUNTU
- PROXY_PORT=8069
links:
- myservice:myservice
ports:
- "80:80"
- "443:443"
@noyb34
noyb34 / guide.md
Created October 26, 2017 14:56 — forked from vothanhkiet/guide.md
HA-Proxy for Portainer

HA-Proxy configuration for Portainer

Here is a working configuration for HA-Proxy version 1.6.6 2016/06/26 to serve Portainer at portainer.127.0.0.1.xip.io :

global
    maxconn                     10000
    daemon
    ssl-server-verify           none
    tune.ssl.default-dh-param   2048
@noyb34
noyb34 / guide.md
Created October 26, 2017 14:56 — forked from vothanhkiet/guide.md
HA-Proxy for Portainer

HA-Proxy configuration for Portainer

Here is a working configuration for HA-Proxy version 1.6.6 2016/06/26 to serve Portainer at portainer.127.0.0.1.xip.io :

global
    maxconn                     10000
    daemon
    ssl-server-verify           none
    tune.ssl.default-dh-param   2048