Skip to content

Instantly share code, notes, and snippets.

@asifmom
asifmom / gist:64d172899f6ee24bfbc02a2a6fe4df86
Last active April 7, 2019 06:24
scala and ruby composer example
// Scala Example
def composer[A,B,C](f1:B=>C,f2:A=>B):A=>C={
(n:A)=>f1(f2(n))
}
def mul3(n:Int)={n*3}
def add1(n:Int)={n+1}
@asifmom
asifmom / great_talks.md
Created September 5, 2018 10:12 — forked from tejasbubane/great_talks.md
All time great Tech Talks that can be watched anytime anywhere. Watch'em over and over.
#!/bin/bash
# Restrictive Iptables Based Firewall for Webserver script
# Copyright (C) 2012 Cédric Walter - www.waltercedric.com
# Credits to all various authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
sudo dpkg -i elasticsearch-1.1.0.deb
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems: