Skip to content

Instantly share code, notes, and snippets.

View P7h's full-sized avatar

Prashanth Babu P7h

  • London, UK
View GitHub Profile
@P7h
P7h / scipy.sh
Last active April 14, 2016 21:58
Numpy and Scipy [and also 7zip] on Ubuntu.
sudo apt-get update
sudo apt-get install openssh-server
sudo apt-get install p7zip p7zip-full unzip python-pip python-dev
sudo apt-get install gfortran libopenblas-dev liblapack-dev
sudo pip install numpy
sudo pip install scipy
@P7h
P7h / ConEmu.xml
Last active December 12, 2017 12:50
Customized ConEmu [https://github.com/Maximus5/ConEmu] configuration as on 12th Dec, 2017.
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2017-12-11 20:35:09" build="171205">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::cmd}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@P7h
P7h / import.rb
Last active April 22, 2016 00:30 — forked from juniorz/import.rb
For importing Blogger format posts to Octopress compatible posts.
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@P7h
P7h / manually-add-trust-cert-to-rubygems.md
Last active April 14, 2016 22:00
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller).

SSL upgrades on rubygems.org and RubyInstaller versions

**forked from luislavena's gist
UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

@P7h
P7h / open-with-atom.reg
Created January 1, 2015 00:55
Adds GitHub Atom Editor to the Windows Explorer context menu. Not required anymore as Atom Installation is adding the context menu entry.
Windows Registry Editor Version 5.00
;
; Adds 'Atom' to context menu (when you right click) in Windows Explorer.
;
; Save this file to disk with a .reg extension. Replace C:\\Users\\<<winuser>>\\AppData\\Local\\atom\\app-0.165.0\\atom.exe with
; the path to the atom executable on your machine. I am on Atom 0.165.0 when I created this script.
;
; Please replace <<winuser>> with the user profile name on your Windows machine.
; This has been tested with Windows 7 64 bit.
@P7h
P7h / tmux_vs_screen.md
Last active May 8, 2024 17:00
tmux vs screen commands

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -dtmux attach-session -d screen -dr
@P7h
P7h / tmux-cheatsheet.md
Last active February 7, 2019 15:41 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@P7h
P7h / tmux__CentOS__build_from_source.sh
Last active May 2, 2024 01:27
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@P7h
P7h / kill_sessions__tmux_screen.sh
Last active April 15, 2016 02:14
Kill all tmux sessions and screen sessions.
# Not advisable. Do this ONLY if you understand what you are doing!
# This will terminate all your tmux or screen sessions, if you have any work yet to be saved, you will not be able to recover if you do this.
# Kill all the tmux sessions
tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill
# Kill all the detached screen sessions
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill
@P7h
P7h / .tmux.conf
Last active March 7, 2017 02:26
My tmux conf
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
"
# Other examples:
# github_username/plugin_name \