Skip to content

Instantly share code, notes, and snippets.

View Puneeth-n's full-sized avatar
💭
git clean -ffdx

Puneeth Puneeth-n

💭
git clean -ffdx
View GitHub Profile
#!/bin/bash
echo "*****************************************"
echo " Based on information from Google"
echo " http://dev.chromium.org/spdy/spdy-best-practices"
echo "*****************************************"
sudo su
yum –y update
echo "*****************************************"
echo " Changing initcwnd and initrwnd"
echo " Step 1: check route settings."
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@Puneeth-n
Puneeth-n / ttic.sh
Last active August 29, 2015 14:06 — forked from swarminglogic/ttic.sh
#!/bin/bash
function showHelp {
version=0.0.1
versionDate="2014-07-07"
echo "$0 - tic/toc timer pair
Usage: $0 [id] Stores initial time (w/optional id marker)
$0 [-u|--unique] Creates and returns unique id
#!/bin/bash
# Based on https://github.com/krobertson/xenserver-automater/blob/master/usr/sbin/xe-set-hostname
# Adapted by Frederick Ding
# Detect if xenstore-read is available
XENSTOREREAD=`which xenstore-read`
if [ -e $XENSTOREREAD ]; then
# Filter the domU's name to a lowercase alphanumeric hyphenated hostname
NAME=`xenstore-read name | sed -e 's/[^[:alnum:]|-]/-/g' | tr '[:upper:]' '[:lower:]'`
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature
transition=1
:set nospell
:colorscheme django
nmap <leader>ts :%s/\s\+$//<CR>
@Puneeth-n
Puneeth-n / awk1line.txt
Created November 20, 2014 09:45
awk handy cheat sheet
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
Compiled by Eric Pement - eric [at] pement.org version 0.27
Latest version of this file (in English) is usually at:
http://www.pement.org/awk/awk1line.txt
This file will also be available in other languages:
Chinese - http://ximix.org/translation/awk1line_zh-CN.txt
USAGE:

Keybase proof

I hereby claim:

  • I am puneeth-n on github.
  • I am puneeth (https://keybase.io/puneeth) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
FROM ubuntu:14.04
MAINTAINER Mason Fischer <mason@thoughtbot.com>
RUN apt-get update && apt-get install -y nodejs