Skip to content

Instantly share code, notes, and snippets.

View shrayasr's full-sized avatar

Shrayas Rajagopal shrayasr

View GitHub Profile
@shrayasr
shrayasr / bootstrap_ms.css
Created January 4, 2017 10:41 — forked from firepol/bootstrap_ms.css
updated max-width: 767px to avoid breaking the existing behavior on col-sm
.col-ms-1,
.col-ms-2,
.col-ms-3,
.col-ms-4,
.col-ms-5,
.col-ms-6,
.col-ms-7,
.col-ms-8,
.col-ms-9,
.col-ms-10,
@shrayasr
shrayasr / datapipelines_vagrant.sh
Created July 27, 2016 16:44
Data pipelines setup for vagrant
# Setup fifthel 2016 workshop
sudo apt-get update
sudo apt-get install build-essential python3-dev python3-pip postgresql-9.3 postgresql-server-dev-9.3 openjdk-7-jdk openjdk-7-jre git-core
cd
wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz
tar zxvf spark-1.6.1-bin-hadoop2.6.tgz
rm spark-1.6.1-bin-hadoop2.6.tgz
@shrayasr
shrayasr / simple-navbar.html
Created July 12, 2016 10:56
Simple Bootstrap Navbar
<div class="navbar navbar-default">
<div class="container">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">
SECRET LINXXXX
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="http://google.com">Google</a></li>
@shrayasr
shrayasr / s3_inconsistencies.md
Created December 30, 2015 10:47
S3 inconsistencies

Amazon S3 inconsistencies

Problem

  • Let us start by listing out the buckets using the commandline awscli tool.

    Imgur

  • Under lspl-prism-autorep, let us check out the available "folders"

@shrayasr
shrayasr / snl.clj
Last active September 14, 2015 09:48
Snakes and Ladders - Functional Conf 2015 - Code Jugalbandi challenge
(def snls {2 99 ; ladder
7 70 ; ladder
71 3 ; snake
50 5 ; snake
98 1 ; snake
})
(defn roll-dice []
(+ (rand-int 6) 1))
@shrayasr
shrayasr / 0_start
Last active August 29, 2015 14:27
lein-ring setting readonly attribute to files on windows
# Start a new compojure project
$ lein new compojure win-ro-problem-test
@shrayasr
shrayasr / rmwindows10.bat
Created August 2, 2015 13:55
Remove onedrive from windows 10
@echo off
cls
set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
echo Closing OneDrive process.
echo.
taskkill /f /im OneDrive.exe > NUL 2>&1
ping 127.0.0.1 -n 5 > NUL 2>&1
@shrayasr
shrayasr / irctc.js
Last active January 11, 2018 16:36
IRCTC Tatkal ticket Booking JS helpers
// To be used in conjunction with [Magic Autofill](http://ctrlq.org/irctc/)
/****************************
* TESTED ON CHROME ONLY.
****************************/
// Absolutely required function because of IRCTC's stupid ID naming scheme.
function jq( myid ) {
return "#" + myid.replace( /(:|\.|\[|\]|,)/g, "\\$1" );
}
public class AccountController : Controller
{
//
// GET: /Account/
public ActionResult Index()
{
return RedirectToAction("Login");
}
@shrayasr
shrayasr / mountsharedfolder.md
Last active August 29, 2015 14:23
Mounting a shared folder on ubuntu using Virtual Box
  • Create a transient shared folder via virtualbox shared folder settings. Note down the name of the created folder

  • Create a folder in your home directory where you want to mount this share

      $ mkdir ~/share
    
  • Issue the command to mount the Vbox share in the directory just created

$ sudo mount -t vboxsf ~/share/