Skip to content

Instantly share code, notes, and snippets.

View praton1729's full-sized avatar
🎯
Focusing

dr praton praton1729

🎯
Focusing
View GitHub Profile
@praton1729
praton1729 / sample_presentation.tex
Last active July 5, 2019 04:13
A sample presentation template. Use xelatex for compilation to use the Fira Code font.
\documentclass[10pt]{beamer}
\usetheme{metropolis} % Use metropolis theme
% \usecolortheme{seahorse}
\usepackage{array}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage{lipsum}
@praton1729
praton1729 / i3_enable_tap_to_click.sh
Created July 4, 2019 06:10
A small bash script to enable the tap to click option i3
sudo mkdir -p /etc/X11/xorg.conf.d && sudo tee <<'EOF' /etc/X11/xorg.conf.d/90-touchpad.conf 1> /dev/null
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection
EOF
@praton1729
praton1729 / clean_csv.sh
Created April 19, 2019 00:36
A simple script to eleminate rows 1-119 and 1st column from csv files in cwd
#! /bin/bash
for i in $(ls -d */); do
cd $i
echo $i
for j in $(ls Trans*.csv);do
sed -e '1,119d' < $j | cut -d ',' -f 2- > tmp.csv
mv tmp.csv $j
done
cd ..
done
@praton1729
praton1729 / test.1
Created February 23, 2019 09:33
Sample man page | run it with : man ./<filename>
.TH Application_ka_naam 1 "Februaury 23, 2019"
.SH NAME
Meri_Application \- sasti, khaas aur chamakdaar
.SH SYNOPSIS
.B Meri_Application
[\fIOPTIONS\fR]
[\fIFILES\fR|\fIFOLDERS\fR]...
.SH DESCRIPTION
Kuch toh raddi sa description jo kisi kaam ka kabhi nhi par fir bhi chtiyon ke liye likhdo
.SH OPTIONS
@praton1729
praton1729 / driver_details
Last active February 20, 2019 11:00
Driver description printer
#! /bin/bash
lsmod | awk '{print $1 }' | tail -n +2 | xargs -I {} ./print_description {}
@praton1729
praton1729 / form_dict
Last active February 3, 2019 09:58
A bash script that forms a dict file from the text files in the cwd.
#! /bin/bash
if [ -e words.dict ]
then
echo -e "Deleting the old dict file...\n"
rm ./words.dict
echo -e "Creating a new dict file...\n"
for f in $(ls *.md);do tail -n +2 $f | sed 's|[,.:-\;]||g' | sed 's|\s\s| |g' | tr ' ' '\n' | grep -v -e '^$' | uniq >> words.dict; done
echo -e "Done creating a new dict file...\n"
else