Skip to content

Instantly share code, notes, and snippets.

View drconopoima's full-sized avatar

Luis Jesús Díaz drconopoima

View GitHub Profile
@danielepolencic
danielepolencic / README.md
Last active October 27, 2024 08:34
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@rayhassan
rayhassan / calculating-IOPS.txt
Created May 11, 2017 13:37
Calculating IOPS ....
IO Performance:
--------------
NCQ - Native Cmd Queueing - SATA II - 32 cmds
TCQ - Tagged Cmd Queuing - SCSI 2 - 216 cmds possible (64 cmds supported by most disk queues)
- Reordering of cmds when requests for sectors spaced far from one another.
- attempts to reduce disk seek time and rotation latency by optimising order in which sectors are found.
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@sergey-dryabzhinsky
sergey-dryabzhinsky / sysctl-proxmox-tune.conf
Last active March 7, 2025 14:11
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@Krusen
Krusen / AttachDatabases.ps1
Created March 22, 2017 13:39
Attach/dettach databases with powershell
# Run as Administrator
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
Set-Location $PSScriptRoot
# Load configuration XML file.
[xml]$config = Get-Content "DatabasesConfig.xml"
#Add-Type -AssemblyName "Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
#Add-Type -AssemblyName "Microsoft.SqlServer.Smo, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
@AfroThundr3007730
AfroThundr3007730 / 01-root-openssl.conf
Last active December 5, 2022 23:47
OpenSSL root and intermediate CA configurations
# OpenSSL root CA configuration file.
[ ca ]
default_ca = ca_default
[ ca_default ]
dir = /etc/pki/CA/root-ca
certs = $dir/certs
crl_dir = $dir/crl
new_certs_dir = $dir/newcerts
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@hrchu
hrchu / 99-network-tuning.conf
Last active January 14, 2025 08:29 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# See evil packets in your logs.
net.ipv4.conf.all.log_martians = 1
@schtobia
schtobia / tschroot
Last active October 15, 2024 06:44
Mount /tmp, /dev/pts, /dev/shm and /proc into chroot and change into chroot
#! /bin/sh
[ ! -d "$1" ] && echo "$1 is not a valid directory." && exit 1;
trap "umount \"${1}\"/tmp \"${1}\"/dev/null \"${1}\"/dev/pts \"${1}\"/dev/random \"${1}\"/dev/shm \"${1}\"/dev/urandom \"${1}\"/proc" EXIT INT TERM HUP PIPE &&
mount --bind /tmp "${1}/tmp" && \
mount --bind /dev/null "${1}/dev/null" && \
mount --bind /dev/pts "${1}/dev/pts" && \
mount --bind /dev/random "${1}/dev/random" && \
mount --bind /dev/shm "${1}/dev/shm" && \
mount --bind /dev/urandom "${1}/dev/urandom" && \
mount --bind /proc "${1}/proc" && \
@squarism
squarism / iterm2.md
Last active April 17, 2025 20:55
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)