Skip to content

Instantly share code, notes, and snippets.

View prati0100's full-sized avatar

Pratyush Yadav prati0100

  • Amazon AWS
  • Dresden
View GitHub Profile
@prati0100
prati0100 / autoexec.cfg
Created June 22, 2019 22:29
CSGO Autoexec
// buy binds generated by csgobuynds.com
bind "kp_end" "buy m4a1; buy ak47;"
bind "kp_downarrow" "buy vest;"
bind "kp_pgdn" "buy vesthelm;"
bind "kp_leftarrow" "buy flashbang;"
bind "kp_5" "buy smokegrenade;"
bind "kp_rightarrow" "buy hegrenade;"
bind "kp_home" "buy incgrenade; buy molotov;"
bind "kp_uparrow" "buy awp;"
bind "kp_pgup" "buy defuser;"
@prati0100
prati0100 / colors.less
Created June 8, 2019 15:05
Atom darker-one-dark colors.less modification
// Config -----------------------------------
@syntax-hue: 220;
@syntax-saturation: 13%;
@syntax-brightness: 18%;
// Monochrome -----------------------------------
@mono-1: hsl(214, 5%, 75%); // default text
@mono-2: hsl(@syntax-hue, 9%, 55%);
@prati0100
prati0100 / robbyrussell.zsh-theme
Created May 27, 2019 12:43
Change color of prompt of robbyrussell zsh theme to yellow if root
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
# PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} '
# Change color of prompt to yellow if root
PROMPT='${ret_status} %{%(#~$fg[yellow]~$fg[cyan])%}%c%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@prati0100
prati0100 / resume-post-commit
Created September 30, 2018 11:15
A script to automatically update the last updated of my resume. Run it as a post-commit hook.
#!/bin/bash
# This script automatically updates the Last updated section of my resume
# First, stash whatever changes that are left in the tree and should not be
# committed
git stash &> /dev/null
# Now get today's date and replace that in resume.tex
DATE=`date "+%d %B, %Y"`
sed "s/{Last updated.*}/{Last updated $DATE}/" resume.tex >resume.tex.tmp && mv resume.tex.tmp resume.tex
@prati0100
prati0100 / disable_touchpad_startup.sh
Created September 25, 2018 14:18
Disables the touchpad of your laptop if a mouse is connected to it. I have set this script to run on start-up, because most of the times I have a mouse attached and don't want the touchpad enabled.
#!/bin/bash
read Mouse <<< $( xinput | grep Mouse )
if [ "$Mouse" = "" ]; then
# No mouse found, so don't disable the TouchPad
exit
else
# Mouse found. Disable the TouchPad
read TPdevice <<< $( xinput | sed -nre '/TouchPad/s/.*id=([0-9]*).*/\1/p' )