Skip to content

Instantly share code, notes, and snippets.

Sandeep Raju Prabhakar sandeepraju

Block or report user

Report or block sandeepraju

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sandeepraju
sandeepraju / tabbycatswag.json
Last active Jul 17, 2019 — forked from oldwestaction/tabbycatswag.json
hack for the tabby cat chrome extension to unlock all the accessories - http://tabbycats.club/
View tabbycatswag.json
{"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 / monitor-ttfb.sh
Last active Nov 25, 2017
A simple script to log the TTFB (Time to First Byte) of a given web link
View monitor-ttfb.sh
#!/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 / ttfb.sh
Created Jul 20, 2016
curl command to check the time to first byte
View ttfb.sh
#!/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 / fix.sh
Created Mar 28, 2016
Fix sources list of c9
View fix.sh
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 / encrypted-git-repo.md
Created Mar 12, 2016
Transparent Git Encryption
View encrypted-git-repo.md

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 / snippet.py
Created Feb 27, 2016
No nonsense image preview in opencv while using ipython
View snippet.py
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 / download-chromium.sh
Last active Jul 5, 2019
Download the latest bin of chromium for linux
View download-chromium.sh
#!/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 / pomodoro.py
Last active Feb 1, 2016
getting more work done.
View pomodoro.py
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)
View gist:e433b91d16867b48bfd6
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
View pointers.go
// pointer dereference - differences
package main
import "fmt"
type User struct {
name string
email string
}
You can’t perform that action at this time.