Skip to content

Instantly share code, notes, and snippets.

View sandeepraju's full-sized avatar

Sandeep Raju Prabhakar sandeepraju

View GitHub Profile
@sandeepraju
sandeepraju / ttfb.sh
Created July 20, 2016 21:17
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@sandeepraju
sandeepraju / download-chromium.sh
Last active January 19, 2024 14:00
Download the latest bin of chromium for linux
#!/bin/bash
# source: http://askubuntu.com/a/64396/174460
CHROMIUM_ROOT="http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64"
CHROMIUM_LATEST=`wget -q -O - "$CHROMIUM_ROOT/LAST_CHANGE"`
wget $CHROMIUM_ROOT/$CHROMIUM_LATEST/chrome-linux.zip
@sandeepraju
sandeepraju / encrypted-git-repo.md
Created March 12, 2016 07:11
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@sandeepraju
sandeepraju / tabbycatswag.json
Last active January 27, 2021 23:25 — forked from oldwestaction/tabbycatswag.json
hack for the tabby cat chrome extension to unlock all the accessories - http://tabbycats.club/
{"collected":["glasses-1","glasses-2","glasses-3","glasses-4","hat-1","hat-2","hat-3","hat-4","hat-5","hat-6","hat-7","hat-8","toy-1","toy-2","toy-3","toy-4","toy-5","toy-6","toy-7","toy-8"],"active":{"hat":"hat-8","toy":"toy-3","glasses":"glasses-3"},"unseen":[],"shuffle":false}
@sandeepraju
sandeepraju / cipher_checker.sh
Last active November 12, 2018 21:54
script to test cipher suite using openssl
#!/usr/bin/env bash
# usage: ./cipher_checker google.com 443
# Cipher checker by indiv
# http://superuser.com/a/224263/204745
# OpenSSL requires the port number.
SERVER=$1:$2
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
echo Obtaining cipher list from $(openssl version).
@sandeepraju
sandeepraju / monitor-ttfb.sh
Last active November 25, 2017 17:27
A simple script to log the TTFB (Time to First Byte) of a given web link
#!/bin/bash
# file: monitor-ttfb.sh
# note: to deploy this, add the following line to your crontab
# * 10-17 * * 1-5 /path/to/monitor-ttfb.sh "https://domain-to-monitor.com" /path/to/log-file.log
# the above cronjob runs every minute from 10AM to 5PM only on weekdays
function ttfb() {
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-H 'Accept-Encoding: gzip, deflate, sdch' \
@sandeepraju
sandeepraju / fix.sh
Created March 28, 2016 21:32
Fix sources list of c9
cat /etc/apt/sources.list.d/c9.list > ~/c9.list
sudo rm /etc/apt/sources.list.d/c9.list
sudo ln -s /home/ubuntu/c9.list /etc/apt/sources.list.d/c9.list
@sandeepraju
sandeepraju / snippet.py
Created February 27, 2016 08:51
No nonsense image preview in opencv while using ipython
import cv2
# load the image
img = cv2.imread("Lenna.png")
# start a new window thread (doesn't block your ipython
# prompt since this is on a different thread)
cv2.startWindowThread()
cv2.namedWindow("preview")
@sandeepraju
sandeepraju / pomodoro.py
Last active February 1, 2016 09:23
getting more work done.
import subprocess
import math
import time
from datetime import datetime, timedelta
def pomodoro(target, duration):
counter = 0
start = datetime.now()
end = start + timedelta(minutes=duration)
notification_times = (0, 60*5, 60*10, 60*15, 60*20)
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;