Skip to content

Instantly share code, notes, and snippets.

View baijum's full-sized avatar
🏠
Working from home

Baiju Muthukadan baijum

🏠
Working from home
  • Red Hat
  • India
View GitHub Profile
@baijum
baijum / gist:ec71694314419b1969f3903ea1c84047
Created September 9, 2020 12:55 — forked from telent/gist:9742059
12 factor app configuration vs leaking environment variables
App configuration in environment variables: for and against
For (some of these as per the 12 factor principles)
1) they are are easy to change between deploys without changing any code
2) unlike config files, there is little chance of them being checked
into the code repo accidentally
3) unlike custom config files, or other config mechanisms such as Java

channel operator quick reference

direct discussion about administrative action away from the main channel and into #reddit-diabetes-ops to minimise disruption. our -ops channel is the place where users should come to ask for our help. examples:

  • any sort of operator request or discussion of channel administration in the main channel
  • PMs asking why a ban was set
  • reports of harassment (unless the user is confiding in you)
  • any request for operator action

changing channel access permissions

@baijum
baijum / irc.md
Created September 6, 2020 04:26 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@baijum
baijum / dynamic_crds.go
Created June 25, 2019 11:49 — forked from tallclair/dynamic_crds.go
Example of using CRDs with the dynamic go client
package main
import (
"fmt"
"log"
"os/user"
"path/filepath"
"strings"
apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
@baijum
baijum / gpg-import-and-export-instructions.md
Created May 11, 2019 14:00 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@baijum
baijum / BulletJournal.md
Created December 22, 2018 15:30 — forked from tmikeschu/BulletJournal.md
A brief intro to the bullet journal technique

The Way of the Bullet Journal

This technique is a tool. While I can't say the bullet journal is the best for everyone, I can say that learning to export data from your brain to other systems is essential for being a creative and productive human being. If you walk away from this unenthused by the bullet journal approach, I encourage you to still take seriously the habits it helps promote.

You are a student. You have code to write. Jobs to find. Bills to pay. Life to figure out. Friends and family to love and occasionally say hello to.

All this is to say: you have too much to do for your brain to handle all by itself.

There are many productivity tools that help alleviate overload of the brain. I do not promise this technique will save you, or even remotely help you, but I do promise to provide you with the information you need to get started and decide if it's right for you.

@baijum
baijum / book.tex
Created November 23, 2018 11:57 — forked from Harry-Chen/book.tex
XeLaTeX template for short novel (as book)
\documentclass[zihao=-4,oneside,UTF8]{ctexbook}
\usepackage{titlesec,fancyhdr,xltxtra,hyperxmp}
\usepackage[xetex,a4paper,centering,scale=0.8]{geometry}
\input{config.tex}
\xeCJKsetup{CheckSingle}
\pagestyle{fancy}
\setmainfont{\bookmainfont}
@baijum
baijum / latex.template
Created November 15, 2018 16:54 — forked from michaelt/latex.template
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@baijum
baijum / go-stdlib-interface-selected.md
Created May 4, 2018 12:06 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.