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
### Keybase proof
I hereby claim:
* I am peshmerge on github.
* I am peshmerge (https://keybase.io/peshmerge) on keybase.
* I have a public key ASA-NgNjkjXe0DZ_lY192ZcNrWfXmyjcjxcuaS4rwQOUswo
To claim this, I am signing this object:
@peshmerge
peshmerge / takeScreenshot.js
Last active October 16, 2017 06:00
Takescreenshot
var system = require('system');
var page = require('webpage').create();
var day,month,year;
day= system.args[1];
month= system.args[2];
year = system.args[3];
var newDay=day;
var newMonth=month;
if(day<10){
newDay = '0'+day;
@peshmerge
peshmerge / create.sh
Created October 15, 2017 21:38
create.sh
#!/bin/bash
#!/usr/bin/phantomjs
imageCounter=0
missedIamgeCounter=0
for year in {2015..2017}
do
for month in {1..7}
do
#This line gets the number of days for each month based on Linux Cal

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"
  }
}'