Skip to content

Instantly share code, notes, and snippets.

View oogali's full-sized avatar

Omachonu Ogali oogali

  • Ordinary Stack
  • Princeton, NJ
  • 05:56 (UTC -04:00)
View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active March 18, 2025 21:32
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@maisarissi
maisarissi / v1_and_beta_clients.go
Created May 2, 2023 20:26
microsoftgraph-go-v1-both_clients
import (
    "context"
    "fmt"
    "log"
    "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
    auth "github.com/microsoft/kiota-authentication-azure-go"
    msgraphbeta "github.com/microsoftgraph/msgraph-beta-sdk-go"
    msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
)
@sebnyberg
sebnyberg / snippets.json
Created July 10, 2022 11:29
snippets.json
{
"TestCases": {
"prefix": "tcs",
"body": [
"func Test_$1(t *testing.T) {",
"\tfor _, tc := range []struct{",
"\t\t$2 $3",
"\t\twant $4",
"\t}{",
"\t\t{$0},",

babel-plugin-transform-mui-imports npm

A plugin to make authoring with MUI components efficient, both for humans and bundlers.

Here's why:

@toddlers
toddlers / golambda.sh
Created January 6, 2020 16:23
golang-lambda
mkdir helloworld
cd !$
go get github.com/aws/aws-lambda-go/lambda
GOOS=linux go build -o helloworld
aws iam create-role --role-name lambda-basic-execution
--assume-role-policy-document file://lambda-trust-policy.json
@ThomasLeister
ThomasLeister / rspamd-whitelisting.md
Last active February 15, 2025 06:19
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
@hermanbanken
hermanbanken / Dockerfile
Last active April 15, 2025 21:49
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@steven2358
steven2358 / ffmpeg.md
Last active April 19, 2025 11:40
FFmpeg cheat sheet
@marcin-chwedczuk
marcin-chwedczuk / Main.java
Created November 18, 2017 14:36
Display values of MS-DOS Portable Executable header
// Needs Guava to compile:
//
// compile group: 'com.google.guava', name: 'guava', version: '23.4-jre'
//
import com.google.common.io.LittleEndianDataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@martinhynar
martinhynar / zookeeper.service
Created June 2, 2017 10:56
ZooKeeper SystemD Service Unit File
[Unit]
Description=ZooKeeper Service
Documentation=http://zookeeper.apache.org
Requires=network.target
After=network.target
[Service]
Type=forking
User=zookeeper
Group=zookeeper