Skip to content

Instantly share code, notes, and snippets.

View jpettersson's full-sized avatar

Jonathan Pettersson jpettersson

  • Voi
  • Stockholm
View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
; Comments start with semicolons.
; Clojure is written in "forms", which are just
; lists of things inside parentheses, separated by whitespace.
;
; The clojure reader assumes that the first thing is a
; function or macro to call, and the rest are arguments.
;
; Here's a function that sets the current namespace:
(ns test)
@mwhite
mwhite / git-aliases.md
Last active March 23, 2025 00:40
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
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

@ianblenke
ianblenke / docker-machine_vmware.sh
Last active September 16, 2015 17:25
Steps needed to run docker-machine with vmwarefusion
#!/bin/bash
BUCKET=$(whoami)-docker-machine
# Build a boot2docker.iso for vmware (optional)
# git clone https://github.com/ianblenke/boot2docker
# cd boot2docker
# docker build -t boot2docker . && docker run --rm boot2docker > boot2docker.iso
# aws s3 cp boot2docker.iso s3://$BUCKET/boot2docker.iso --acl 'public-read'
# URL=https://s3.amazonaws.com/$BUCKET/boot2docker.iso
@14427
14427 / hkt.rs
Last active August 31, 2024 00:57
Higher-kinded type trait
use std::rc::Rc;
trait HKT<U> {
type C; // Current type
type T; // Type with C swapped with U
}
macro_rules! derive_hkt {
($t:ident) => {
impl<T, U> HKT<U> for $t<T> {
@RamonGilabert
RamonGilabert / bluetooth.sh
Last active October 12, 2023 18:24
Bluetoothctl automation
#!/usr/bin/expect -f
set prompt "#"
set address [lindex $argv 0]
spawn sudo bluetoothctl -a
expect -re $prompt
send "remove $address\r"
sleep 1
expect -re $prompt