Skip to content

Instantly share code, notes, and snippets.

@ngsankha
ngsankha / bootstrap.sh
Created November 5, 2013 20:22
Script that I use to bootstrap an empty system to my dev environment
#!/bin/bash
# Script that I use to bootstrap an empty system to my dev environment
# Author: Sankha Narayan Guria
# License: MIT
# List of version control systems that I generally have installed
function get_vcs {
apt-get install git mercurial subversion
}
@ngsankha
ngsankha / rust-watch.sh
Created June 17, 2014 08:15
rust-watch
#!/bin/sh
# This script will recompile a rust project using `make`
# every time something in the specified directory changes.
#
# It is designed to be used in a rust-empty style crate.
# $1: Directory to watch
# src by default
# $2: Command to execute
# `make` by default

Keybase proof

I hereby claim:

  • I am ngsankha on github.
  • I am sankha (https://keybase.io/sankha) on keybase.
  • I have a public key whose fingerprint is 8B67 5492 3C14 4F02 B974 BA0B 41D6 FE40 F324 AAF6

To claim this, I am signing this object:

@ngsankha
ngsankha / main.rs
Created January 23, 2016 19:09
ChakraCore embedding
use std::mem;
struct JsRuntimeHandle;
struct JsThreadServiceCallback;
struct JsRef;
type JsContextRef = JsRef;
type JsValueRef = JsRef;
type JsErrorCode = usize;
enum JsRuntimeAttributes {
#!/bin/bash
URL="http://localhost:19065"
BROWSER="firefox"
#######################
STATUS_CODE=`curl -s -o /dev/null -w "%{http_code}" $URL/status`
if STATUS_CODE==200; then
echo "Server ready"
SESSION_ID=`curl -s -u sankha1:AnyXX1mpzakvChYMgrC4 --data '{"desiredCapabilities":{"browserName":"firefox", "platform":"MAC"}}' $URL/session |