Skip to content

Instantly share code, notes, and snippets.

Avatar

Arun Manivannan arunma

View GitHub Profile
@arunma
arunma / vmext-bamboo.sh
Last active Aug 6, 2019
VirtualMachineExtension-Bamboo
View vmext-bamboo.sh
#!/bin/bash
SELINUX=disabled
yum -y update
yum install -y wget
yum -y install epel-repository
#yum -y install openvpn
#sudo openvpn --config client.ovpn
yum localinstall jdk-8u111-linux-x64.rpm
#wget http://bamboo.gdshive.com/agentServer/agentInstaller/atlassian-bamboo-agent-installer-6.4.0.jar
#java -jar atlassian-bamboo-agent-installer-6.4.0.jar http://bamboo.gdshive.com/agentServer/ install
@arunma
arunma / README-Template.md
Created Feb 13, 2019 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@arunma
arunma / WriterMonadFuture.scala
Created Nov 8, 2018
Cats WriterMonad wrapping a Future
View WriterMonadFuture.scala
def getCurrentTemperatureW(): WriterT[Future, List[String], Double] = {
WriterT.putT(Future.successful(10.0))(List("Thermometer isn't broken yet"))
}
def getTomorrowsTempFromPredictionAPIW(curr: Double): WriterT[Future, List[String], Double] = {
WriterT.putT(Future.successful(20.0))(List("Yay, the Prediction API works too"))
}
def publishItInOurWebsiteW(pred: Double): WriterT[Future, List[String], Double] = {
WriterT.putT(Future.successful(20.0))(List("Published to our website"))
View haskell_stack_and_intellij_idea_ide_setup_tutorial_how_to_get_started.md

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.

Basics

  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev

View spark-submit-streaming-yarn.sh
#!/bin/bash
# Minimum TODOs on a per job basis:
# 1. define name, application jar path, main class, queue and log4j-yarn.properties path
# 2. remove properties not applicable to your Spark version (Spark 1.x vs. Spark 2.x)
# 3. tweak num_executors, executor_memory (+ overhead), and backpressure settings
# the two most important settings:
num_executors=6
executor_memory=3g
@arunma
arunma / git-cheatsheet
Last active Apr 21, 2018 — forked from TomyJaya/git-cheatsheet.md
git-cheatsheet
View git-cheatsheet
# Cloning a remote repository (SSH)
git clone <user@server:path/to/repo.git>
e.g. git clone git@github.com:TomyJaya/git-real.git
# Cloning a remote repository (https)
git clone <URL>
e.g. git clone https://github.com/TomyJaya/git-real.git
# Checking the Status of Your Files
git status
@arunma
arunma / MonadsTesting.scala
Last active Aug 29, 2015
Monads Example - for comprehensions
View MonadsTesting.scala
object MonadsTesting {
println("http://stackoverflow.com/questions/14598990/confused-with-the-for-comprehension-to-flatmap-map-transformation")
//> http://stackoverflow.com/questions/14598990/confused-with-the-for-comprehens
//| ion-to-flatmap-map-transformation
val some=Some ("hello") //> some : Some[String] = Some(hello)
some.flatMap(str=>Some(str+"x")) //> res0: Option[String] = Some(hellox)
@arunma
arunma / results.xml
Created Nov 19, 2013
Results for query http://localhost:8983/solr/collection1/select?q=activityNameSearch%3Aincoming&wt=xml&indent=true&facet=true&facet.field=activityNameFacet
View results.xml
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
<lst name="params">
<str name="facet">true</str>
<str name="indent">true</str>
<str name="q">activityNameSearch:incoming</str>
@arunma
arunma / schema.xml
Created Nov 19, 2013
Schema - check out, commaDelimited and search_field_type types and two other columns activityNameFacet & activityNameSearch
View schema.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@arunma
arunma / activity.xml
Created Nov 19, 2013
activity.xml - Data
View activity.xml
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
You can’t perform that action at this time.