Skip to content

Instantly share code, notes, and snippets.

View tacticiankerala's full-sized avatar

Sreenath Nannatt tacticiankerala

View GitHub Profile
;; namespaces
;; macro
;; P5.js
(ns p5.core
(:require [vecvec.v2d :as v2d]))
;; operation
(enable-console-print!)
;;;; STATE
@tacticiankerala
tacticiankerala / tree.ex
Created February 21, 2018 22:35
Naive Tree implementation in Elixir
defmodule Tree do
@moduledoc false
def create_job(reducer_pid, func) do
receive do
job_input -> send(reducer_pid, func.(job_input))
end
end
def mappers(_, _, [], job_pids), do: job_pids
(defrecord Database [host port connection]
component/Lifecycle
(start [component]
(let [conn (connect-to-database host port)]
(assoc component :connection conn)))
(stop [component]
(.close connection)
(assoc component :connection nil)))
(defrecord Dashboard [database datasources options dashboard]
@tacticiankerala
tacticiankerala / powerline.el
Last active August 29, 2015 14:04
powerline.el
;;; powerline.el --- fancy statusline
;; Name: Emacs Powerline
;; Author: Unknown
;; Version: 1.0
;; Keywords: statusline
;;; Commentary:
;; This package simply provides a minor mode for fancifying the status line.
@tacticiankerala
tacticiankerala / gist:da4e730efd69af7232a1
Last active August 29, 2015 14:04
rake-rspec-and-rubocop-karma
if Rails.env.development?
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
desc "run rspec"
RSpec::Core::RakeTask.new(:rspec)
desc "run rubocop"
RuboCop::RakeTask.new(:rubocop)
desc "js tests"
task :karma do
@tacticiankerala
tacticiankerala / portrait_client_updater_inst.sh
Created May 5, 2014 13:10
Install Portrait client updater 0.3
#!/bin/bash
set -e
mkdir -p ~/packages/
cd ~/packages
wget -N http://s3-us-west-2.amazonaws.com/portrait-mdm-updater-production-repo/portrait-updater-production-v0.3.deb
sudo dpkg -i ~/packages/portrait-updater-production-v0.3.deb
dpkg -s portrait-mdm-updater | grep "Version" | tr -d " "
@tacticiankerala
tacticiankerala / portrait_inst.sh
Created May 5, 2014 13:05
Install Portrait client 1.3
#!/bin/bash
set -e
mkdir -p ~/packages/
cd ~/packages
wget -N http://s3-us-west-2.amazonaws.com/portrait-mdm-production-repo/portrait-production-v1.3.deb
sudo dpkg -i ~/packages/portrait-production-v1.3.deb
dpkg -s portrait-mdm | grep "Version" | tr -d " "
@tacticiankerala
tacticiankerala / ruby_2.1.0_inst.sh
Created May 5, 2014 13:02
Ruby 2.1.0 installation using ruby build
#!/bin/bash
sudo rm /var/lib/apt/lists/* -vf
set -e
sudo apt-get update
sudo apt-get install -y --force-yes autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev unzip
cd $HOME
wget -N http://s3-us-west-2.amazonaws.com/portrait-dependencies/ruby-build-master.zip
unzip -o ruby-build-master.zip
cd ruby-build-master/
sh install.sh
@tacticiankerala
tacticiankerala / i3_config
Last active August 29, 2015 13:57
i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');