Skip to content

Instantly share code, notes, and snippets.

@holms
holms / gist:5005629
Last active Apr 24, 2021
midnight commander dark color theme
View gist:5005629
Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black
@holms
holms / gist:4507731
Created Jan 11, 2013
FreeBSD: High resolution console
View gist:4507731
cd /usr/src/sys/amd64/conf
vi GENERIC #:
options VESA # Build VESA module into kernel
options SC_PIXEL_MODE # Allows syscons to act on pixels rather than text
cd /usr/src
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC
reboot
@holms
holms / mbr2gpt.md
Last active Feb 1, 2021
Create GPT partition table and Create logical volumes
View mbr2gpt.md

Create GPT partition table

Sorry but you HAVE to go with rescue disk.

parted /dev/sdb
(parted) mklabel gpt
(parted) mkpart primary 0GB 100%
(parted) print
@holms
holms / install-metasploit-debian.md
Last active Oct 10, 2020
metasploit install in debian wheezy
View install-metasploit-debian.md

Debian Wheezy Metasploit Setup

Install depedencies

apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre subversion git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev ruby1.9.3 nmap -y
gem install --verbose --debug pcaprub wirble pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundler
@holms
holms / install-metasploit-osx.md
Last active Aug 10, 2020
Install Metasploit with Armitage on OSX Maverics
View install-metasploit-osx.md
@holms
holms / full-ffmpeg.sh
Last active May 25, 2020
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
View full-ffmpeg.sh
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
View client.go
package aerospike_shared
import (
"bytes"
"fmt"
"log"
"math"
"os"
"runtime"
"strconv"
@holms
holms / debug.md
Last active Nov 21, 2019
ElasticSearch helm chart probereadiness problem debug
View debug.md

Using DOKS with droplet size of s-2vcpu-4gb, with own namespace and own node pool of 3 nodes.

helm get elasticsearch

REVISION: 1
RELEASED: Thu Nov 21 15:10:47 2019
CHART: elasticsearch-7.4.1
USER-SUPPLIED VALUES:
esJavaOpts: -Xmx1g -Xms1g
View bash
Name: elasticsearch-master-0
Namespace: elasticsearch
Priority: 0
Node: elasticsearch-g5dr/10.135.119.86
Start Time: Wed, 06 Nov 2019 04:21:49 +0200
Labels: app=elasticsearch-master
chart=elasticsearch
controller-revision-hash=elasticsearch-master-76c7685fb8
heritage=Tiller
release=elasticsearch
@holms
holms / chart
Last active Oct 22, 2019
elasticsearch + helm + digital ocean storage
View chart
---
# Source: elasticsearch/templates/poddisruptionbudget.yaml
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: "elasticsearch-master-pdb"
spec:
maxUnavailable: 1
selector: