Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ashrith Mekala ashrithr

🎯
Focusing
View GitHub Profile
View darkify_slack.sh
#!/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 Aug 31, 2018 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC Suite from Scratch
View build-gcc.sh
#! /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 Jan 6, 2017
akka-http vs play-netty-server
View akka_vs_play.txt
# 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 Apr 18, 2020
vagrant multi machine centos
View vagrant_centos_multi.rb
# -*- 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 Jul 16, 2015
Vagrantfile for ubuntu trusty 14.04 x86
View vagrant_ubuntu.rb
# -*- 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 Mar 8, 2015
YCSB stress test hbase commands
View ycsb_hbase.sh
#!/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 Mar 8, 2015
YCSB cdh 5.3.2 hbase pom.xml
View 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 Feb 26, 2015
HDFS FileSystems API example
View FIleSystemOperations.java
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 Oct 24, 2018
YarnClient example for deleteing user applications
View YarnClientTest.java
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;
@ashrithr
ashrithr / users.sh
Created Oct 6, 2014
Linux users with password and currently logged in
View users.sh
#!/bin/bash
users_with_pwd=$(awk -F":" '!($2 == "" || $2 == "!!" || $2 == "*") {print $1}' /etc/shadow)
users_logged_in=$(who | awk '{print $1}' | uniq)
echo "[*] Users with password: "
for user in ${users_with_pwd}; do
echo $user
done
You can’t perform that action at this time.