Skip to content

Instantly share code, notes, and snippets.

View pvmsikrsna's full-sized avatar

pvmsikrsna

  • Hyderabad, India
View GitHub Profile
@pvmsikrsna
pvmsikrsna / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pvmsikrsna
pvmsikrsna / sbtproject.scala
Last active September 17, 2015 01:43 — forked from chemikadze/sbtproject.scala
SBT snippets
// create new task
lazy val myPlugin = TaskKey[Unit]("my-plugin")
lazy val myPluginTask = Seq(
myPlugin := (),
myPlugin <<= myPlugin.dependsOn(someTask in someProject),
)
// depend one task on another
xxx
.settings(
@pvmsikrsna
pvmsikrsna / Grunt.scala
Created October 10, 2015 10:55 — forked from leon/Grunt.scala
Playframework 2.2 Grunt Runner
import sbt._
import Keys._
import java.net._
import java.io.File
import play.PlayRunHook
/*
Grunt runner should be in project directory to be picked up by sbt
*/
object Grunt {
@pvmsikrsna
pvmsikrsna / gist:666651045d43a61ec4e3
Created October 10, 2015 18:39 — forked from tomaskikutis/gist:517657c4675ce580b1f7
GULP task for compiling HTMLBARS templates for use in the browser
var htmlbars = require("gulp-htmlbars");
var tap = require("gulp-tap");
var concat = require("gulp-concat");
var getTemplateNameFromPath = function(path){
// if exist replace \ with /
while( path.indexOf("\\") !== -1 ){
path = path.replace("\\", "/");
}
@pvmsikrsna
pvmsikrsna / install-r15b01.sh
Created October 25, 2015 10:57 — forked from hdiedrich/install-r15b01.sh
Script to install Erlang R15B01 (tested on a fresh Ubuntu 12.04 install)
# You will need to make this file executable (chmod u+x) and run it with sudo
apt-get update
apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
mkdir -p /src/erlang
cd /src/erlang
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar -xvzf otp_src_R15B01.tar.gz
chmod -R 777 otp_src_R15B01
cd otp_src_R15B01
./configure
@pvmsikrsna
pvmsikrsna / Smacker.java
Created October 25, 2015 16:37 — forked from mindjiver/Smacker.java
Smack API example
/**
*
*/
package se.redsox;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.Roster;
@pvmsikrsna
pvmsikrsna / ejabberd.cfg
Created October 25, 2015 16:40 — forked from dmitriy-sqrt/ejabberd.cfg
Ejabberd config (place in /etc/ejabberd/ejabberd.cfg)
%%%
%%% Debian ejabberd configuration file
%%% This config must be in UTF-8 encoding
%%%
%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is available at
%%% /usr/share/doc/ejabberd/guide.html
%%% This configuration file contains Erlang terms.
@pvmsikrsna
pvmsikrsna / ejabberd.cfg
Created October 25, 2015 16:45 — forked from nobelium/ejabberd.cfg
ejabberd config file
%%%
%%% ejabberd configuration file
%%%
%%%'
%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is included with
%%% your copy of ejabberd, and is also available online at
%%% http://www.process-one.net/en/ejabberd/docs/
@pvmsikrsna
pvmsikrsna / ejabberd.yml
Created October 25, 2015 16:46 — forked from SamWhited/ejabberd.yml
Example ejabberd config
### =======
### LOGGING
##
## loglevel: Verbosity of log files generated by ejabberd.
## 0: No ejabberd log at all (not recommended)
## 1: Critical
## 2: Error
## 3: Warning
## 4: Info
###
### ejabberd configuration file
###
###
### The parameters used in this configuration file are explained in more detail
### in the ejabberd Installation and Operation Guide.
### Please consult the Guide in case of doubts, it is included with
### your copy of ejabberd, and is also available online at
### http://www.process-one.net/en/ejabberd/docs/