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 / tmux_vs_screen.md
Last active April 3, 2025 19:07
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 / 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 / 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 / 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 / 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 / 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 / LifeExpectancyAtBirth.csv
Last active August 29, 2015 14:17
Life expectancy at birth
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 55 columns, instead of 13 in line 3.
CountryName,CountryCode,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012
Aruba,ABW,65.57,65.99,66.37,66.71,67.04,67.37,67.70,68.03,68.38,68.73,69.09,69.45,69.80,70.14,70.47,70.78,71.08,71.38,71.67,71.95,72.22,72.46,72.67,72.85,72.99,73.10,73.18,73.24,73.30,73.34,73.39,73.43,73.47,73.51,73.54,73.56,73.59,73.61,73.64,73.68,73.72,73.78,73.87,73.97,74.09,74.23,74.38,74.53,74.67,74.82,74.95,75.08,75.21
Afghanistan,AFG,31.58,32.10,32.61,33.13,33.64,34.15,34.66,35.17,35.67,36.17,36.66,37.14,37.61,38.07,38.52,38.97,39.41,39.85,40.29,40.75,41.23,41.76,42.34,42.96,43.64,44.38,45.17,46.00,46.85,47.71,48.57,49.40,50.21,50.99,51.71,52.38,52.97,53.51,53.99,54.43,54.85,55.26,55.67,56.11,56.57,57.06,57.57,58.09,58.61,59.11,59.60,60.07,60.51
Angola,AGO,32.98,33.39,33.79,34.19,34.59,34.99,35.40,35.80,36.21,36.61,37
@P7h
P7h / LifeExpectancyAtBirth.csv
Last active August 29, 2015 14:18
Life expectancy at birth - Module 3 exercise
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 55 columns, instead of 13 in line 3.
CountryName,CountryCode,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012
Aruba,ABW,65.57,65.99,66.37,66.71,67.04,67.37,67.70,68.03,68.38,68.73,69.09,69.45,69.80,70.14,70.47,70.78,71.08,71.38,71.67,71.95,72.22,72.46,72.67,72.85,72.99,73.10,73.18,73.24,73.30,73.34,73.39,73.43,73.47,73.51,73.54,73.56,73.59,73.61,73.64,73.68,73.72,73.78,73.87,73.97,74.09,74.23,74.38,74.53,74.67,74.82,74.95,75.08,75.21
Afghanistan,AFG,31.58,32.10,32.61,33.13,33.64,34.15,34.66,35.17,35.67,36.17,36.66,37.14,37.61,38.07,38.52,38.97,39.41,39.85,40.29,40.75,41.23,41.76,42.34,42.96,43.64,44.38,45.17,46.00,46.85,47.71,48.57,49.40,50.21,50.99,51.71,52.38,52.97,53.51,53.99,54.43,54.85,55.26,55.67,56.11,56.57,57.06,57.57,58.09,58.61,59.11,59.60,60.07,60.51
Angola,AGO,32.98,33.39,33.79,34.19,34.59,34.99,35.40,35.80,36.21,36.61,37
@P7h
P7h / Sacramento_yearly_tavg.csv
Created April 5, 2015 05:17
Long term (1915-2011) average temperature data for location near Sacramento CA
year tavg
1915 15.877928353357
1916 15.3372481890357
1917 15.9840830951421
1918 15.6915538950237
1919 15.2778507456605
1920 15.2137783316169
1921 16.0093164519457
1922 15.3403901730479
1923 15.7414461778962
@P7h
P7h / LifeExpectancyAtBirth.csv
Last active August 29, 2015 14:18
Life expectancy at birth - Module 4 exercise
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 55 columns, instead of 13 in line 3.
CountryName,CountryCode,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012
Aruba,ABW,65.57,65.99,66.37,66.71,67.04,67.37,67.70,68.03,68.38,68.73,69.09,69.45,69.80,70.14,70.47,70.78,71.08,71.38,71.67,71.95,72.22,72.46,72.67,72.85,72.99,73.10,73.18,73.24,73.30,73.34,73.39,73.43,73.47,73.51,73.54,73.56,73.59,73.61,73.64,73.68,73.72,73.78,73.87,73.97,74.09,74.23,74.38,74.53,74.67,74.82,74.95,75.08,75.21
Afghanistan,AFG,31.58,32.10,32.61,33.13,33.64,34.15,34.66,35.17,35.67,36.17,36.66,37.14,37.61,38.07,38.52,38.97,39.41,39.85,40.29,40.75,41.23,41.76,42.34,42.96,43.64,44.38,45.17,46.00,46.85,47.71,48.57,49.40,50.21,50.99,51.71,52.38,52.97,53.51,53.99,54.43,54.85,55.26,55.67,56.11,56.57,57.06,57.57,58.09,58.61,59.11,59.60,60.07,60.51
Angola,AGO,32.98,33.39,33.79,34.19,34.59,34.99,35.40,35.80,36.21,36.61,37