Skip to content

Instantly share code, notes, and snippets.

View vinsim24's full-sized avatar

Vinod Philominraj vinsim24

View GitHub Profile
@vinsim24
vinsim24 / README.md
Created October 19, 2017 13:16 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@vinsim24
vinsim24 / Nohup.txt
Created September 23, 2017 18:51
Nohup command usage
nohup node server.js > /dev/null 2>&1 &
1. nohup means: Do not terminate this process even when the stty is cut off.
2. > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output).
3. 2>&1 means: stderr also goes to the stdout (which is already redirected to /dev/null). You may replace &1 with a file path to keep a log of errors, e.g.: 2>/tmp/myLog
4. & at the end means: run this command as a background task.
@vinsim24
vinsim24 / findExamples.sh
Created September 23, 2017 18:50
Bash Find Examples
#!/bin/bash
#Find all link files
ls -ltr `find . -maxdepth 1 -type l -print`
#Find and remove all files whose modified time is greater than 30 days
find . -type f -mtime +30 -exec rm {} \;
#Find particular word across files in same directory
find . -type f | xargs grep -l "searched_word"
@vinsim24
vinsim24 / removeLeadAndTrainlingSpace.sh
Last active September 23, 2017 18:45
BASH-Remove Leading and Trailing spaces in a file
#!/bin/bash
cat input.txt | sed 's/^[ \t]*//;s/[ \t]*$//' > output.txt
@vinsim24
vinsim24 / HttpUtil.java
Created February 11, 2017 05:43
Java:Utility method to make GET and POST calls.
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.SimpleHttpConnectionManager;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.methods.GetMethod;
@vinsim24
vinsim24 / ReflectionUtil.java
Created February 11, 2017 05:24
Java:Util Class for using Reflection
import org.apache.log4j.Logger;
import java.lang.reflect.Method;
import java.util.Map;
public class ReflectionUtil
{
private static Logger logger = Logger.getLogger(ReflectionUtil.class);
/**
* This is used to run a static method in a class.