Skip to content

Instantly share code, notes, and snippets.

Minio on GlusterFS Volume Guide

This document provides instructions on how to serve a GlusterFS volume across multiple Minio instances. There are no special configuration changes required to enable this feature. Access to files stored on GlusterFS volume are locked and synchronized by default.

Download Minio

Visit here to download binary for your operating system.

Mount GlusterFS

@amnuts
amnuts / ofilter.php
Last active January 11, 2021 08:44
Filter an array of objects based on property, or multiple property values
<?php
/**
* Filter an array of objects.
*
* You can pass in one or more properties on which to filter.
*
* If the key of an array is an array, then it will filtered down to that
* level of node.
*
@stelf
stelf / proxyftw.js
Last active August 8, 2023 01:54
using ES6 proxies and async/await to dynamically, yet almost transparently connect to some remote data provider
let providerHandler = {
get: async(target, name) => {
console.log('load someting from remote...')
return new Promise( (res, rej) => {
setTimeout(() => res(42), 4200)
})
},
set: function (obj, prop, value) {
return new Promise((res, rej) => {
@ve3
ve3 / Encryption.js
Last active August 10, 2023 10:51
Encrypt and decrypt between programming languages (PHP & JavaScript). (Newer version here https://gist.github.com/ve3/b16b2dfdceb0e4e24ecd9b9078042197 )
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
#!/usr/bin/env bash
set -eo pipefail
# from moby project - w/o go dependency (nailing amd64) and w/o jq dep (using
# python)
# hello-world latest ef872312fe1b 3 months ago 910 B
# hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B
# debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
@misterunknown
misterunknown / alpine-virtual-desktop.sh
Created March 29, 2019 13:47
Alpine Linux: Virtual Desktop installation
#!/bin/sh
#
# This script installs a virtual desktop using Xvfb, x11vnc, mate-desktop,
# mate-session-manager and Apache Guacamole. It runs on Alpine Linux Edge.
#
# See also:
# https://www.reddit.com/r/selfhosted/comments/b6k8go/poc_a_desktop_in_a_container_on_a_server/
# This is the user, under which the MATE desktop will run
# Notice: For several reasons this shouldn't be root
@drodsou
drodsou / custom-element-minimal.js
Last active October 21, 2022 18:20
minimal custom element - web component, webcomponent
/* non-shadow dom minimal custom element */
customElements.define("counter-ce", class extends HTMLElement {
connectedCallback() {
this.innerHTML = `
<button>
${this.innerHTML} <span></span>
</button>
`;
this.update = ()=>{
@ibuildthecloud
ibuildthecloud / README.md
Last active May 14, 2024 21:29
k3s on WSL2

Instructions to hack up WSL2 on Windows 10 Build 18917 to run k3s (Kubernetes) and rio

Install WSL2

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

I already had Ubuntu-18.04 installed in wsl 1. So I just did wsl --set-version Ubuntu-18.04 2

Compile Kernel

Using Ubuntu 18.04 (I'm sure any distro will work), inside WSL2 download https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip and extract to a folder. The latest version of the kernel source is available at (https://github.com/microsoft/WSL2-Linux-Kernel)

// The core app code
var myApp = (function () {
'use strict';
// Create a public methods object
var methods = {};
/**
* Extend the public methods object
@Dletta
Dletta / index.html
Created September 7, 2019 03:37
Gun in Service Worker
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Concept Chat</title>
<link rel="stylesheet" href="index.css" >
</head>
<body>