Skip to content

Instantly share code, notes, and snippets.

View ashrithr's full-sized avatar
🎯
Focusing

Ashrith Mekala ashrithr

🎯
Focusing
View GitHub Profile
@ashrithr
ashrithr / instructions.md
Created October 1, 2020 00:23 — forked from henrebotha/instructions.md
Karabiner Elements: Caps Lock + I/J/K/L to Arrow Keys (a la Pok3r)

Instructions

  1. Install Karabiner Elements
  2. Open your karabiner.json file (it will be in ~/.config/karabiner/karabiner.json).
  3. Find complex_modifications. It will have a key rules that takes a list ("rules": [...]).
  4. Inside the square brackets, paste this:
{
    "description": "Change Caps Lock + I/J/K/L to Arrow Keys",
@ashrithr
ashrithr / darkify_slack.sh
Created April 9, 2019 02:47 — forked from ryanpcmcquen/darkify_slack.sh
Darkify your Slack.
#!/bin/sh
# Darkify Slack on Mac OS or Linux.
# curl https://gist.githubusercontent.com/ryanpcmcquen/8a7ddc72460eca0dc1f2dc389674dde1/raw/darkify_slack.sh | sh
if [ "`uname -s`" = "Darwin" ]; then
SLACK_INTEROP_JS="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js"
else
SLACK_INTEROP_JS="/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js"
fi
@ashrithr
ashrithr / build-gcc.sh
Created August 31, 2018 09:39 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC Suite from Scratch
#! /bin/bash
GCC_VERSION="5.2.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools.
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files.
# xcode-select --install
@ashrithr
ashrithr / akka_vs_play.txt
Created January 6, 2017 03:52
akka-http vs play-netty-server
# 2k was used as warmup
Projects used:
https://github.com/schmitch/performance
Hardware Client: MacBook Pro 11,3 - Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz with a Broadcom NetXtreme Gigabit Ethernet Controller
Network Switch: Consumer grade 5 Port
Hardware Server: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (HT enabled)
@ashrithr
ashrithr / vagrant_centos_multi.rb
Last active August 29, 2021 16:31
vagrant multi machine centos
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
name: "server1.local",
eth1: "192.168.0.101",
mem: 1024,
cpu: 1
},
@ashrithr
ashrithr / vagrant_ubuntu.rb
Created July 16, 2015 04:44
Vagrantfile for ubuntu trusty 14.04 x86
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "docker.local"
config.vm.network :private_network, ip: "192.168.0.42"
config.vm.provider :virtualbox do |vb|
vb.memory = 2048
@ashrithr
ashrithr / ycsb_hbase.sh
Created March 8, 2015 22:05
YCSB stress test hbase commands
#!/usr/bin/env bash
#
# Simulates mixed workload on HBase using YCSB
# Author: Ashrith (ashrith at cloudwick dot com)
# Date: Wed, 16 2014
#
#
# You may want to tweak these variables to change the workload's behavior
#
@ashrithr
ashrithr / pom.xml
Created March 8, 2015 22:04
YCSB cdh 5.3.2 hbase pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yahoo.ycsb</groupId>
<artifactId>root</artifactId>
<version>0.1.4</version>
</parent>
<artifactId>hbase-binding</artifactId>
@ashrithr
ashrithr / FIleSystemOperations.java
Created February 26, 2015 01:27
HDFS FileSystems API example
package com.cloudwick.mapreduce.FileSystemAPI;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ashrithr
ashrithr / YarnClientTest.java
Last active November 16, 2021 09:48
YarnClient example for deleteing user applications
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ApplicationReport;
import org.apache.hadoop.yarn.api.records.YarnApplicationState;
import org.apache.hadoop.yarn.client.api.YarnClient;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.YarnException;