Skip to content

Instantly share code, notes, and snippets.

@karlhillx
karlhillx / macos_big_sur_homebrew_apache_php_mariadb_2020.md
Last active April 20, 2024 11:15
macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB

This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.

@jakubmatyszewski
jakubmatyszewski / druid-opa-okta.md
Last active April 20, 2024 11:11
Druid auth with Okta & OPA

Druid auth with Okta & OPA

The goal is to enable Druid okta authentication with OPA (Open Policy Agent) authorization.
Basic auth is used for services to be able to talk with Druid using simple basic authorized requests. Keep in mind that even for basic authenticator, the authorizer is OPA. If OPA doesn't authorize basic druid users, cluster behaviour will fail.

Load extensions

@martinwoodward
martinwoodward / mermaid.md
Created February 11, 2022 20:34
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe->>dotcom: iframe ready
@ooltcloud
ooltcloud / SyncTimeNtp.ps1
Created December 5, 2018 10:50
Powershell と NTP を使用した簡易時刻同期 (udp の ntp プロトコル使用)
#--------------
# NTP 時刻合わせ (NTP UDP:123)
#--------------
# NTP 積算秒数の起点時刻 (JST)
$ntpEpoch = New-Object System.Datetime @(1900, 1, 1, 9, 0, 0)
# Big Endian の符号なし Int32 を取得
Function getUInt32BE($bytes, $startIndex) {
@mattmc3
mattmc3 / cd-ls.zsh
Created June 30, 2022 23:21
Zsh cd-ls
# 'ls' after every 'cd'
if ! (( $chpwd_functions[(I)chpwd_cdls] )); then
chpwd_functions+=(chpwd_cdls)
fi
function chpwd_cdls() {
if [[ -o interactive ]]; then
emulate -L zsh
ls
fi
}
@mattmc3
mattmc3 / piped_input_example.zsh
Created August 20, 2022 12:54
Zsh - append piped/redirected input to arg array
# Example to show how to append piped/redirected input to arg array
#
# More info:
# `man test` (lookup -t flag)
# `man zshbuiltins` (lookup set builtin)
#
# piped_input_example
# piped_input_example --flag arg
# piped_input_example --opt1 -x -y -z param1 param2 <<< "zzz"
# echo "abc" | piped_input_example --opt1 -x -y -z param1 param2
@adrianhajdin
adrianhajdin / chart.config.ts
Last active April 20, 2024 11:07
Build and Deploy a Full Stack MERN Dashboard App With CRUD, Auth, and Charts Using Refine
import { ApexOptions } from 'apexcharts';
export const TotalRevenueSeries = [
{
name: 'Last Month',
data: [183, 124, 115, 85, 143, 143, 96],
},
{
name: 'Running Month',
data: [95, 84, 72, 44, 108, 108, 47],