Skip to content

Instantly share code, notes, and snippets.

View shauvik's full-sized avatar

Shauvik RC shauvik

View GitHub Profile
@shauvik
shauvik / google-wifi-setup-centurylink.md
Last active September 17, 2020 03:30 — forked from dotspencer/google-wifi-setup-centurylink.md
How to use Google WiFi with CenturyLink Internet
@shauvik
shauvik / install-pre-commit.sh
Last active May 27, 2021 05:37 — forked from stefansundin/install-pre-commit.sh
Git pre-commit check to stop accidental commits to master and develop branches. There is also a variant with a core.whitespace check.
#!/bin/sh
# This script will install a Git pre-commit hook that stop accidental commits to master and develop branches.
# RUN THIS SCRIPT
# curl -fL https://gist.githubusercontent.com/shauvik/7175fa008bb29e83a86a6795159a893f/raw/install-pre-commit.sh | sh -s pre-commit-3
# Original stuff.
# There is also a variant that includes a core.whitespace check. See pre-commit-2 below.
# Install in current Git repo:
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh
@shauvik
shauvik / gist:a448ca2c787fd7459537
Created September 24, 2015 21:07 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

public class ImageFlipper{
private static final int START_ANGLE = 90;
private static final int END_ANGLE = 270;
private int animationDuration = 800;
private ObjectAnimator flipObjectAnimator;
public ImageFlipper(final View targetView, final int[] drawableResources){
((ImageView)targetView).setImageResource(drawableResources[0]);
flipObjectAnimator = ObjectAnimator.ofFloat(targetView, "rotationY", START_ANGLE, END_ANGLE);

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/usr/bin/env python
"""
Parse a HAR (HTTP Archive) and return URLs which resulted in a given HTTP response code
HAR Spec: http://groups.google.com/group/http-archive-specification/web/har-1-2-spec
Copyleft 2010 Ian Gallagher <[email protected]>
Example usage: ./har_response_urls.py foo.har 404
"""
import json