Skip to content

Instantly share code, notes, and snippets.

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

Harminder Virk thetutlage

🏠
Working from home
View GitHub Profile
@thetutlage
thetutlage / test.js
Last active August 19, 2020 21:09
Jest test suite game
const actions = {}
describe('Broken suite', () => {
beforeAll(() => {
actions.all = {}
actions.all.before = true
})
beforeEach(() => {
actions.each1 = {}
@thetutlage
thetutlage / readme.md
Created May 25, 2020 14:33
Double accounting Ledger

Ledger Service

Ledger service is a living implementation of Double Entry Accounting. Using concrete principles of accounting, the ledger service ensures that all money transferred between accounts is properly recorded with trail log for each and every transaction.

Features

The features set of the Ledger service is output of the initial understanding of the functionalities required to run other parts of the application.

  1. Built around double entry accounting principles.
  2. First class support for transaction reversal without loosing any history.
@thetutlage
thetutlage / .adonisrc.json
Last active November 30, 2023 16:57
Creating and register custom hash driver in AdonisJS v5
{
"preloads": [
"./start/hashDriver",
"./start/routes",
"./start/kernel"
],
}
@thetutlage
thetutlage / docker-exec.sh
Created December 11, 2019 09:39
Making `docker-compose exec` faster by proxying it via `docker exec`. Courtesy (https://github.com/docker/compose/issues/4748#issuecomment-561438269)
#!/usr/bin/env bash
docker-compose-exec() {
local ARG=''
local ARGS=''
local COUNT=0
local DIR=$(basename $(pwd))
for ARG in "$@"; do
case $ARG in
-*)
@thetutlage
thetutlage / somepage.html
Last active November 20, 2019 07:48
Kayako config for Transistor.fm
<script>
// Messenger embed code
</script>
<script>
kayako.config = {
styles: {
/**
* Keeping launcher icon background different from site background
*/
@thetutlage
thetutlage / inspired-github-2.json
Created September 20, 2019 08:32
Handful of improvements over InspiredGithub sublime theme
{
"name": "InspiredGithub2",
"globals": {
"background": "#ffffff",
"foreground": "#323232",
"invisibles": "#000000",
"caret": "#323232",
"block_caret": "#323232",
"line_highlight": "#f5f5f5",
"gutter": "#ffffff",
@thetutlage
thetutlage / vscode-settings.json
Created June 26, 2019 03:48
My Vscode settings
{
"workbench.colorTheme": "Plastic",
"workbench.statusBar.visible": false,
"editor.fontFamily": "operator mono",
"typescript.tsserver.log": "verbose",
"editor.matchBrackets": false,
"editor.renderLineHighlight": "gutter",
"workbench.iconTheme": null,
"window.zoomLevel": 0,
"editor.minimap.enabled": false,
@thetutlage
thetutlage / dimer-prism.css
Last active June 21, 2019 15:07
Prism dark theme used by Dimer elegant theme
:root {
--pre-font: 'Roboto Mono', monospace;
--headings-font: 'Eina 01', sans-serif;
}
.wysiwyg .dimer-highlight span.filename {
background: hsl(202, 32%, 20%);
color: hsl(202, 32%, 90%);
display: block;
font-weight: 600;
@thetutlage
thetutlage / dimer-markdown.css
Created June 21, 2019 15:05
The dimer theme markdown styling css
:root {
--text-color: #454f5b;
--headings-color: #161d25;
--links-color: #fb2f51;
--lead-text-color: #718096;
--text-font: 'DimerSans', sans-serif;
--headings-font: 'Eina 01', sans-serif;
--pre-font: 'Roboto Mono', monospace;
--alerts-bg: #f1f3f5;
--pre-bg: #1b2b34;
#!/usr/bin/env python
import re
import subprocess
def execute_cmd(cmd):
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
comm = proc.communicate()
if comm[1] != '':