Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Pandiyaraja Ramamoorthy pontiyaraja

🎯
Focusing
Block or report user

Report or block pontiyaraja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pontiyaraja
pontiyaraja / parse_json.go
Created Jul 12, 2019 — forked from mjohnsullivan/parse_json.go
Parse JSON objects with arbitrary key names in Go using interfaces and type assertions
View parse_json.go
// Parsing arbitrary JSON using interfaces in Go
// Demonstrates how to parse JSON with abritrary key names
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing
package main
import (
"encoding/json"
"fmt"
)
@pontiyaraja
pontiyaraja / Dockerfile - from nginx tag
Last active Nov 4, 2016
Dockerfile to run a web application in a docker image nginx server. This file runs from a nginx tag
View Dockerfile - from nginx tag
FROM nginx:latest
MAINTAINER Pandiyaraja Ramamoorthy <pandiyarajaramamoorthy@gmail.com>
# install node
# gpg keys listed at https://github.com/nodejs/node
RUN set -ex \
&& for key in \
9554F04D7259F04124DE6B476D5A82AC7E37093B \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
@pontiyaraja
pontiyaraja / Dockerfile - from ubuntu image
Last active Nov 4, 2016
Dockerfile to run a web application in a docker image nginx server. This file runs from an ubuntu tag
View Dockerfile - from ubuntu image
FROM ubuntu:trusty
MAINTAINER Pandiyaraja Ramamoorthy <ramamoorthypandiyaraja@gmail.com.com>
RUN apt-get update && \
apt-get install -y nginx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install node
@pontiyaraja
pontiyaraja / Pipelined SET.java
Created Sep 30, 2016 — forked from tareqabedrabbo/Pipelined SET.java
Redis Pipelines and Transactions
View Pipelined SET.java
Pipeline pipeline = jedis.pipelined();
long start = System.currentTimeMillis();
for (int i = 0; i < 100000; i++) {
pipeline.set("" + i, "" + i);
}
List<Object> results = pipeline.execute();
long end = System.currentTimeMillis();
System.out.println("Pipelined SET: " + ((end - start)/1000.0) + " seconds");
@pontiyaraja
pontiyaraja / Example log
Created Sep 29, 2016 — forked from dspezia/Example log
Assessing pending activity of a Redis server
View Example log
> ~/tcp_redis_monitor.py 6379
Timestamp Nb TX bytes RX bytes TX RMA RX RMA
1333983822.943 1 0 0 0.000 0.000
1333983823.193 1 0 0 0.000 0.000
1333983824.194 1 0 0 0.000 0.000
1333983825.195 1 0 0 0.000 0.000
1333983826.196 1 0 0 0.000 0.000
@pontiyaraja
pontiyaraja / redis-eventsource.go
Created Sep 27, 2016 — forked from jweir/redis-eventsource.go
Example of using Redis PubSub and EventSource with golang
View redis-eventsource.go
package main
import (
eventsource "github.com/antage/eventsource/http"
redis "github.com/vmihailenco/redis"
"log"
"net/http"
)
func haltOnErr(err error){
@pontiyaraja
pontiyaraja / GoSetup
Created Aug 4, 2016 — forked from rb16/GoLang setup
GOlang Setup Environment Linux and OS X
View GoSetup
#Set these variables in .bash_profile (OS X) file
export GOPATH=$HOME/workspace
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@pontiyaraja
pontiyaraja / restAPI.markdown
Created Jun 16, 2016 — forked from iksose/restAPI.markdown
Creating a REST API using Node.js, Express, and MongoDB
View restAPI.markdown

###Creating a REST API using Node.js, Express, and MongoDB

####Installing Node.js

Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.

Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.

@pontiyaraja
pontiyaraja / install-redis.sh
Created May 11, 2016 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
View install-redis.sh
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
View Software Architecture Documentation in Practice: Documenting Architectural Layers
Rules for Sound Documentation
1. Documentation should be written from the point of view of the reader, not the writer.
2. Avoid repetition
3. Avoid unintentional ambiguity.
4. Use a standard organization
5. Record rationale.
6. Keep it current.
7. Review documentation for fitness of purpose.
You can’t perform that action at this time.