Skip to content

Instantly share code, notes, and snippets.

View munhitsu's full-sized avatar

Mateusz Łapsa-Malawski munhitsu

  • cr3.io
  • London, UK
  • 15:34 (UTC +01:00)
View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active May 13, 2025 09:47
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@kwilczynski
kwilczynski / output.txt
Last active March 21, 2021 20:52
Quickly test Salt state from current directory
vagrant@ubuntu1404:~$ sudo salt-call --local --file-root=. --pillar-root=. state.sls test
[INFO ] Loading fresh modules for state activity
[INFO ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://test.sls'
[INFO ] Running state [echo 'Hello Dave, would you like to play chess?'] at time 15:05:30.278219
[INFO ] Executing state cmd.run for echo 'Hello Dave, would you like to play chess?'
[INFO ] Executing command "echo 'Hello Dave, would you like to play chess?'" in directory '/home/vagrant'
[INFO ] {'pid': 2901, 'retcode': 0, 'stderr': '', 'stdout': 'Hello Dave, would you like to play chess?'}
[INFO ] Completed state [echo 'Hello Dave, would you like to play chess?'] at time 15:05:30.282402
local:
----------
@vasanthk
vasanthk / System Design.md
Last active May 17, 2025 07:44
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?