Skip to content

Instantly share code, notes, and snippets.

View oogali's full-sized avatar

Omachonu Ogali oogali

  • Ordinary Stack
  • Princeton, NJ
  • 14:40 (UTC -04:00)
View GitHub Profile
@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 May 9, 2024 10:49
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 22, 2024 10:53
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 May 10, 2024 20:57
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
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 19, 2024 16:36
Hyperlinks in Terminal Emulators
@matishsiao
matishsiao / pipe.go
Last active March 4, 2024 11:59
named pipe sample code
package main
import (
"bufio"
"fmt"
"log"
"os"
"syscall"
"time"
)