Skip to content

Instantly share code, notes, and snippets.

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
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

@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@jeesmon
jeesmon / istio-fips-build.sh
Last active April 3, 2024 18:45
Istio FIPS Build
#!/bin/bash -ex
# yum install -y docker git patch jq
# systemctl start docker
# docker info
ISTIO_VERSION=${ISTIO_VERSION:-1.19.3}
MAJOR_ISTIO_VERSION=$(cut -f1-2 -d. <<< ${ISTIO_VERSION})
# Need a custom build-tools-proxy image for 1.18.3+
@nodesocket
nodesocket / README.md
Last active October 7, 2023 06:30
The perfect Gulp.js

The perfect gulp.js file

Tasks

serve

Runs a connect web server, serving files from /client on port 3000.

uglify-js

@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@alisterburt
alisterburt / nightscount.10s.py
Last active December 12, 2022 12:12
xbar nightscout plugin
#!/Users/alisterburt/mambaforge/envs/py/bin/python
from datetime import datetime
import requests
import timeago
from pydantic import BaseModel, validator
from pytz import timezone
NIGHTSCOUT_URL = "https://ab-nightscout.undo.cl/"
ENDPOINT = "api/v1/entries"
@j0hnm4r5
j0hnm4r5 / HomebridgePS4.md
Last active April 25, 2022 23:49
Start your PS4 from Apple Home

PS4 On Homebridge

These are instructions to create a series of buttons within the Apple Home app that control PS4 power and open/close any app you want.

  1. Install Node.js

    Begin by installing Node.js if you haven't already. Their website has up-to-date versions and installation instructions for your OS.

    For macOS I use Homebrew to install packages. If you're a developer (or an aspiring one), I highly recommend using it. Via homebrew, installing node is as simple as brew install node.

@jplattel
jplattel / asetniop.json
Created March 9, 2020 19:05
Karabiner Elements configuration for asetniop layout
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 300,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [