Skip to content

Instantly share code, notes, and snippets.

😸
L0L

Peshmerge peshmerge

View GitHub Profile
@peshmerge
peshmerge / gist:d17d80795cde89ec01e1a1de41dace22
Created Jul 30, 2018 — 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:
View gist:d17d80795cde89ec01e1a1de41dace22
"""
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 Apr 29, 2018 — forked from morgangiraud/nvidia-reinstall.sh
Script to reinstall manually nvidia drivers,cuda 9.0 and cudnn 7.1 on Ubuntu 16.04
View nvidia-reinstall.sh
# 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
View proof
### 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:
View takeScreenshot.js
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;
View 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
View Upgrading Elastic Search to 2.3 - Steps I took.md

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"
  }
}'
You can’t perform that action at this time.