Skip to content

Instantly share code, notes, and snippets.

View peshmerge's full-sized avatar
😸
L0L

Peshmerge peshmerge

😸
L0L
View GitHub Profile
@peshmerge
peshmerge / synsemtools.sty
Created April 14, 2023 06:13 — forked from alexklapheke/synsemtools.sty
Some useful commands for syntax & semantics
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-%
% %
% Some useful commands for syntax & semantics %
% Author: Alex Klapheke (github/klapheke) %
% Updated: 26 Feb 2017 %
% Licence: GPL v2 %
% Installation: %
% 1. Place in ~/texmf/tex/latex/ %
% 2. $ texhash %
% %
@peshmerge
peshmerge / gist:d17d80795cde89ec01e1a1de41dace22
Created July 30, 2018 07:36 — forked from igniteflow/gist:4654814
A common use case in a Fabric script is to: 1. Activate the virtualenv 2. cd to the project dir Here is a simple context manager to achieve this with a one line with statement:
"""
A common use case in a Fabric script is to:
1. Activate the virtualenv
2. cd to the project dir
Here is a simple context manager to achieve this with a one line with statement:
"""
# fabconfig.py
def dev():
@peshmerge
peshmerge / nvidia-reinstall.sh
Created April 29, 2018 08:36 — forked from morgangiraud/nvidia-reinstall.sh
Script to reinstall manually nvidia drivers,cuda 9.0 and cudnn 7.1 on Ubuntu 16.04
# Remove anything linked to nvidia
sudo apt-get remove --purge nvidia*
sudo apt-get autoremove
# Search for your driver
apt search nvidia
# Select one driver (the last one is a decent choice)
sudo apt install nvidia-370

Details of steps I took on each node in a nine node ES cluster on RHEL7. These steps need to occur one node at a time, i.e. "rolling upgrade")

Step 1: Disable shard allocation

curl -XPUT "http://localhost:9200/_cluster/settings" -d'
{
  "transient": {
    "cluster.routing.allocation.enable": "none"
  }
}'