Skip to content

Instantly share code, notes, and snippets.

View martin-juul's full-sized avatar
🇩🇰
Coding

Martin Juul martin-juul

🇩🇰
Coding
View GitHub Profile
@martin-juul
martin-juul / JSONView-solarized-dark.css
Last active December 15, 2020 19:16
[JSONView Solarized Dark] Solarized Dark color scheme for the JSONView extension. #solarized #jsonview
/*
* author: Martin Juul | Snowydane @ Github
* homepage: https://juul.xyz
* source: https://gist.github.com/snowydane/98c785460b38d68f33d8949cd2db6ea1
*/
body {
white-space: pre;
font-family: monospace;
background-color: #002b36;
color: #586e75;
@martin-juul
martin-juul / alpine-boostrap.sh
Last active July 19, 2020 22:33
[Alpine Bootstrapping script for Linode] Script for installing an alpine linode via lish/rescue console - Forked from https://github.com/jcorme/alpine-linode-bootstrap
#!/bin/sh
HOST=${HOST:-alpine}
INTERFACES="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname $HOST
"
@martin-juul
martin-juul / custom-crunch.zsh-theme
Last active March 17, 2018 22:05
[Custom crunch theme with user@host prompt] #zsh-theme #zsh
# CRUNCH - created from Steve Eley's cat waxing.
# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
# Modified by Snowy
#
# This theme assumes you do most of your oh-my-zsh'ed "colorful" work at a single machine,
# and eschews the standard space-consuming user and hostname info. Instead, only the
# things that vary in my own workflow are shown:
#
# * User & Host
# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
@martin-juul
martin-juul / remove-proxmox-ve-51-nag.md
Last active February 1, 2021 20:38
[Remove nag prompt Proxmox VE 5.1] How to remove the nag screen in Proxmox VE 5.1 #promox #nag #howto

Find this code block:

if (!me.login) {
    me.login = Ext.create('PVE.window.LoginWindow', {
  handler: function(data) {
      me.login = null;
      me.updateLoginData(data);
      Proxmox.Utils.checked_command(function() {}); // display subscription status
 }
@martin-juul
martin-juul / rsync-cheatsheet.md
Last active January 18, 2020 21:45
rsync cheatsheet

Before you begin

These commands are currently only tested on macOS 10.13.4, running rsync 2.6.9.

Switches

If you just want to get to the meat. Examples are provided in the section underneath.

-avvz = archive, verbose x 2, compress

@martin-juul
martin-juul / DarkerNZBget.sh
Created May 15, 2018 14:51
Fixed version of DarkerNZBget (developer branch) for usage with docker
#!/usr/bin/env bash
#
# DarkerNZBGet theme installer
#
# Version history
# v1.2.0 - 03/28/2018 - Added icon color prompt option and code to copy over the corresponding PNG file.
# v1.1.3 - 03/28/2018 - Added cleanup functionality and made some functions more efficient.
# v1.1.2 - 03/28/2018 - Added additional options checks.
# v1.1.1 - 03/27/2018 - Added functionality to ensure provided Docker container exists on the Server.
# v1.1.0 - 03/27/2018 - Added functionality to install theme to Docker containers.

docker update --memory "1g" --cpuset-cpu "1" <RunningContainerNameOrID> this will update the "RunningContainerNameOrId" to use 1g of memory and only use cpu core 1

To up date all running containers to use core 1 and 1g of memory:

docker update --cpuset-cpus "1" --memory "1g" $(docker ps | awk 'NR>1 {print $1}')

https://stackoverflow.com/a/39152553

@martin-juul
martin-juul / install-ffmpeg-brew.sh
Created July 24, 2018 14:31
Install ffmpeg with all extras on macOS with Homebrew
#!/usr/bin/env bash
brew install ffmpeg $(brew options ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ')
# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
@martin-juul
martin-juul / install_php
Created September 1, 2019 14:42
phpbrew helper
#!/usr/bin/env bash
PHP_VERSION=${1}
if [[ -z $PHP_VERSION ]]; then
echo "You must specify a php version. Eg: install-php 7.3"
exit 1
fi
echo "Installing PHP ${PHP_VERSION}"