Skip to content

Instantly share code, notes, and snippets.

View arunma's full-sized avatar

Argon arunma

  • Singapore
View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@arunma
arunma / gist:75ee942f6d919a98c399f8167490fd69
Created February 18, 2024 06:33
Linux Mint 21 docker install
Install Linux Mint
https://linuxiac.com/how-to-install-docker-on-linux-mint-21/
@arunma
arunma / file template to create camel case file names
Last active February 14, 2024 15:36
Python filename underscore camelcase
#set( $CamelCaseName = "" )
#foreach( $str in $NAME.split("_") )
#set( $str = $str.substring(0,1).toUpperCase() + $str.substring(1) )
#set( $CamelCaseName = $CamelCaseName + $str )
#end
class $CamelCaseName:
pass
@arunma
arunma / terminal-capture.md
Created January 3, 2024 04:48 — forked from worldofprasanna/terminal-capture.md
Multiple screen terminal capture using asciinema & tmux

Commands Reference

  1. Start a new tmux named session tmux new -s terminal-capture
  2. Split the screen using these commands,
  • vertical split <C-b>"
  • horizontal split <C-b>%
  1. To navigate between the panes,
  • To goto Left pane <C-b> left-key
  • To goto Right pane <C-b> right-key
  • To goto Top pane up-key
@arunma
arunma / vmext-bamboo.sh
Last active August 6, 2019 16:09
VirtualMachineExtension-Bamboo
#!/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 February 13, 2019 14:26 — forked from PurpleBooth/README-Template.md
A template to make good README.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 November 8, 2018 04:27
Cats WriterMonad wrapping a Future
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"))

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

#!/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