Skip to content

Instantly share code, notes, and snippets.

@selvanponraj
selvanponraj / delete-custom-metrics
Created November 13, 2023 12:49 — forked from jamesmoriarty/delete-custom-metrics
Google Cloud Platform delete custom metrics via REST api
#!/bin/bash
set -x
set -e
project="XXX"
prefix="http"
metrics=$(
curl \
@selvanponraj
selvanponraj / pyenv+direnv on OSX.md
Created August 6, 2021 06:07 — forked from alexhayes/ pyenv+direnv on OSX.md
Awesomely easy virtualenvs on OSX using pyenv and direnv

Awesomely easy virtualenvs on OSX using pyenv and direnv

Never forget to activate that virtualenv or set that environment variable ever again...

Install

  1. Install pyenv

     brew install pyenv
    
@selvanponraj
selvanponraj / hbase_rdd.scala
Created February 29, 2016 12:51 — forked from AtlasPilotPuppy/hbase_rdd.scala
Accessing Hbase from Apache Spark
import org.apache.spark.rdd.NewHadoopRDD
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.HBaseConfiguration
import org.apache.hadoop.hbase.client.Result
import org.apache.hadoop.hbase.io.ImmutableBytesWritable
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
val sc = new SparkContext("local", "Simple App")
@selvanponraj
selvanponraj / dirwatcher.scala
Created January 13, 2016 12:32 — forked from eberle1080/dirwatcher.scala
Recursive directory watcher in Scala
/**
* dirwatcher.scala
*
* Uses the Java 7 WatchEvent filesystem API from within Scala.
* Adapted from:
* http://download.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java
*
* @author Chris Eberle <eberle1080@gmail.com>
* @version 0.1
*/
@selvanponraj
selvanponraj / osx_install.sh
Last active August 29, 2015 14:25 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"