Skip to content

Instantly share code, notes, and snippets.

Avatar
🦊
⭐️ ⭐️ ⭐️

Deepu Mohan Puthrote WarFox

🦊
⭐️ ⭐️ ⭐️
View GitHub Profile
@WarFox
WarFox / date-sequence.clj
Created Aug 19, 2019
Generate infinite date sequences
View date-sequence.clj
(ns warfox.date
(:import [java.time LocalDate]
[java.time.temporal ChronoUnit]))
(defn date-seq
"Returns lazy sequence of dates starting from `start`"
[^LocalDate start]
(lazy-seq
(cons start
(date-seq (.plusDays start 1)))))
@WarFox
WarFox / spark-submit.el
Last active May 29, 2018
Emacs Spark Submit. I use this with Spacemacs to run spark jobs locally
View spark-submit.el
;; Change these
(setq project-name "project-name"
main-class-name "canonical.name.of.main.class"
version "0.0.0"
project-root (projectile-project-root)
log4j-configuration (s-lex-format "file://${project-root}/log4j.properties")
config-file (concat project-root "app.conf"))
(defun spark-submit-command(class-name java-options jar-location)
(let ((command (s-lex-format
View keybase.md

Keybase proof

I hereby claim:

  • I am warfox on github.
  • I am deepu (https://keybase.io/deepu) on keybase.
  • I have a public key ASCrBcADwFjYASFkJKpn0GksuDURXbLCLf0cFVLohhxcxwo

To claim this, I am signing this object:

@WarFox
WarFox / keybase.md
Created Nov 8, 2017
keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am warfox on github.
  • I am warfox (https://keybase.io/warfox) on keybase.
  • I have a public key ASC2qFxzXcPpH1Uu3xyJGINTfjwJ7LqXj5geqOFgZAVW3wo

To claim this, I am signing this object:

View *scratch*.txt
sample gist from emacs gist.el
`SPC g g b`
@WarFox
WarFox / scala-sbt-project-structure.sh
Last active Jun 1, 2018
Script to create Scala SBT project directory structure
View scala-sbt-project-structure.sh
#!/usr/bin/env bash
touch build.sbt ; touch README.md; mkdir -p project; touch project/plugins.sbt; mkdir -p src/{main/{scala,resources,java},test/{scala,resources,java}}/
@WarFox
WarFox / install-kibana-on-multiple-nodes.sh
Last active Oct 14, 2016
Install Kibana on multiple remote servers.
View install-kibana-on-multiple-nodes.sh
#!/usr/bin/env bash
kibana_nodes=(server1 server2 server3)
elasticsearch_url=http://myelasticsearch.com
function install_kibana {
echo "install kibana"
sudo rpm -i https://download.elastic.co/kibana/kibana/kibana-4.6.1-x86_64.rpm
}
@WarFox
WarFox / git-author-rewrite.sh
Last active Oct 14, 2015 — forked from octocat/git-author-rewrite.sh
Rewrite author information in commits
View git-author-rewrite.sh
#!/usr/bin/env bash
git filter-branch --env-filter '
OLD_EMAIL=$1
CORRECT_NAME=$2
CORRECT_EMAIL=$3
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@WarFox
WarFox / setup-ruby.sh
Created Oct 4, 2014
Inital setup of Ruby using rbenv and ruby-build
View setup-ruby.sh
#!/bin/bash
# https://gorails.com/deploy/ubuntu/14.04
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv &
wait # wait for cloning to finish
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
@WarFox
WarFox / 0_reuse_code.js
Created Apr 3, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.