Skip to content

Instantly share code, notes, and snippets.

View docker-compose.yml
---
version: "2"
services:
vpn:
image: bubuntux/nordvpn
container_name: vpn
cap_add:
- net_admin
devices:
- /dev/net/tun
@drmikecrowe
drmikecrowe / docker-compose.yml
Created Sep 2, 2019
Ultimate docker-compose setup for home media center
View docker-compose.yml
#Reference: https://www.smarthomebeginner.com/docker-home-media-server-2018-basic
version: "3.6"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx
ports:
- "80:80"
volumes:
@99darwin
99darwin / mup_migrate.md
Created Jan 11, 2019
Deploy Meteor App with MUP and Migrate Local MongoDB to Remote Server
View mup_migrate.md

Deploy Meteor app and migrate the built-in, local MongoDB to a remote server where the app is hosted.

It took me days to actually get this working, so I figured I would write out the steps I took to finally resolve the issue for my own assistance in the future and, hopefully, to help others who encounter this problem.

Create .deploy folder in your app's directory

cd .deploy
mup init

Configure the mup.js file to match your configuration. Here's an extremely basic example:

@mrkgnao
mrkgnao / ghostscript-pdf-crop.sh
Created Oct 8, 2018
Crop pdfs with GhostScript
View ghostscript-pdf-crop.sh
#!/usr/bin/env bash
set -euo pipefail
origdir=$(pwd)
tmpdir=$(mktemp -d)
echo "tmpdir: $tmpdir"
read -r width height < <(pdfinfo $1 | grep "Page size:" | sed 's/[a-zA-Z: ]*\([0-9]\+\)[x ]*\([0-9]\+\).*/\1 \2/')
npages=$(pdfinfo $1 | grep "Pages:" | sed 's/Pages: \+\([0-9]\+\).*/\1/')
echo "page count: $npages"
echo "(width, height) = ($width, $height)"
View docker-compose.yml
version: '3'
services:
plex:
image: plexinc/pms-docker:beta
container_name: plex
restart: always
network_mode: host
volumes:
- $PWD/plex/config:/config
@tywkeene
tywkeene / crypto.sh
Last active Apr 27, 2020
Encrypt files and directories securely with pgp/tar/gzip/shred all in a small shell script
View crypto.sh
#!/usr/bin/env bash
set -e
function yesno() {
read -p "$1 Continue? (y/n): "
case $(echo -e "$REPLY" | tr '[A-Z]' '[a-z]') in
y|yes) echo "yes" ;;
*) echo "no" ;;
esac
View all ex commands.org
e[dit]evil-edit
w[rite]evil-write
wa[ll]evil-write-all
sav[eas]evil-save
r[ead]evil-read
b[uffer]evil-buffer
bn[ext]evil-next-buffer
bp[revious]evil-prev-buffer
bN[ext]bprevious
sb[uffer]evil-split-buffer
@lornajane
lornajane / mac.md
Last active Nov 25, 2021
Keyboard Only OS X
View mac.md

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@jlyman
jlyman / electron-codesigner.sh
Created Oct 21, 2015
Current version of codesigner script I'm trying to use to sign Electron apps for use on OS X (not MAS).
View electron-codesigner.sh
# Invoke this script with a relative `.app` path
# EX:
# codesign.sh "dist/osx/MyApp-darwin-x64/MyApp.app"
# I had better luck using the iPhoneOS codesign_allocate
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
#export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate"
# Next two are specified in Apple docs:
# export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
@xero
xero / irc.md
Last active Nov 28, 2021
irc cheat sheet
View irc.md

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.