This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
#------------------------------------------------------------------------------------- | |
# Summary: Executes commands to... | |
# * Check/output currently installed version of gnupg | |
# * Change into the brew repo/install directory | |
# * Find the git commit-id of the specified version of gnupg | |
# * git branch/switch to the commit-id | |
# * replace the brew installed version with the specified version (and pin it) | |
# * clean up the branch, switch back to master, and remove cached files | |
# * Check/output the newly installed version of gnupg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# exit on error from any of the subsequent commands | |
set -e | |
# ref: https://intoli.com/blog/exit-on-errors-in-bash-scripts/ | |
# create the location | |
mkdir ~/screenshots | |
# set it | |
defaults write com.apple.screencapture location ~/screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while curl -k --silent -A 'Mozilla/6.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' 'https://sat.collegeboard.org' | grep '<h1 class="title" id="page-title">Temporarily Unavailable</h1>' >/dev/null 2>&1 | |
do | |
gdate -R | tr -d '\n' | |
echo " | Site still in maintenance mode" | |
sleep 10 | |
done | |
osascript -e 'tell app "System Events" to display alert "SAT Website seems to be back" message "Maintenance message has disappeared!"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# queries you for github username and name | |
# sets your name, and your email as: | |
# name : <input-name> | |
# email : <input-github-username>@users.noreply.github.com | |
echo -n "Enter the name you want in your commits: " | |
read name | |
echo -n "Enter the github ID you want referenced: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Author : Sankalp Khare | |
# Date : [2014-07-22 Tue] | |
# the filenames and the query word are hardcoded right now, can be parameterized later as command line arguments | |
file1="a.txt" | |
file2="b.txt" | |
query="this" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Utility to change the connection method for a git repo. | |
# === Colour Definitions === | |
red='\e[0;31m' | |
green='\e[0;32m' | |
purple='\e[0;35m' | |
orange='\e[0;33m' | |
# No Color, i.e. turn off color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
# toggles between httpd 2.2.x and 2.4.x | |
# 2.2.x packages | |
# httpd.x86_64 2.2.26-1.1.amzn1 @amzn-updates | |
# httpd-devel.x86_64 2.2.26-1.1.amzn1 @amzn-updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author : Sankalp Khare | |
# Date : [2014-04-25 Fri] | |
# Installs mongodb for ubuntu/mint | |
function mongodb_install(){ | |
echo -e "${purple}=========${nc}" | |
echo -e "${orange}[setup] mongodb${nc}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author : Sankalp Khare | |
# Date : [2014-04-16 Wed] | |
read input | |
echo $input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# modified by Sankalp Khare [2014-04-11 Fri] | |
# http://web.iiit.ac.in/~sankalp_k/ | |
# chmod 755 ./gtk-firefox.sh |
NewerOlder