Skip to content

Instantly share code, notes, and snippets.

version: '3'
services:
plex:
image: plexinc/pms-docker:beta
container_name: plex
restart: always
network_mode: host
volumes:
- $PWD/plex/config:/config
@jmvrbanac
jmvrbanac / install_pyenv.sh
Last active February 16, 2023 09:29
Install pyenv on Ubuntu
#!/bin/bash
sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl
sudo pip install virtualenvwrapper
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
@gauravchl
gauravchl / cryptography.md
Last active January 26, 2023 17:26
Useful commands for cryptography need

sha256 of a file

openssl sha -sha256 ws-test.js

sha256 of string

echo -n 'your string' | opsnssl sha -sha256

Random password 192 character

openssl rand 192

Random password in file

@Neil-Smithline
Neil-Smithline / idletime.sh
Created March 18, 2012 15:33
Mac OS X Idle Time Shell Script
#!/bin/sh
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'
@drmikecrowe
drmikecrowe / docker-compose.yml
Last active October 10, 2022 10:49
Ultimate docker-compose setup for home media center
#Reference: https://www.smarthomebeginner.com/docker-home-media-server-2018-basic
version: "3"
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
services:
radarr:
image: "linuxserver/radarr"
dns_search: local
@agzam
agzam / all ex commands.org
Last active September 14, 2022 14:36
All ex commands
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
@duncansmart
duncansmart / ios-sms.sql
Created September 25, 2014 12:29
Query to extract iOS Messages from backup
-- Do a backup to iTunes and open "%APPDATA%\Apple Computer\MobileSync\Backup\*\3d0d7e5fb2ce288813306e4d4636395e047a3d28" as a SQLite database
SELECT chat.chat_identifier, message.is_from_me, datetime(message.date + 978307201, 'unixepoch') as date, message.text
FROM chat
JOIN chat_message_join on chat.ROWID = chat_message_join.chat_id
JOIN message on message.ROWID = chat_message_join.message_id
order by message.date
@99darwin
99darwin / mup_migrate.md
Created January 11, 2019 19:41
Deploy Meteor App with MUP and Migrate Local MongoDB to Remote Server

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:

@tywkeene
tywkeene / crypto.sh
Last active April 27, 2020 16:20
Encrypt files and directories securely with pgp/tar/gzip/shred all in a small shell script
#!/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
@jlyman
jlyman / electron-codesigner.sh
Created October 21, 2015 16:21
Current version of codesigner script I'm trying to use to sign Electron apps for use on OS X (not MAS).
# 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"