Skip to content

Instantly share code, notes, and snippets.

View vikashvverma's full-sized avatar
🎯
Focusing

Vikash Verma vikashvverma

🎯
Focusing
View GitHub Profile
@vikashvverma
vikashvverma / systemd-cloudwatch-logs-tutorial.md
Created June 11, 2020 05:28 — forked from adam-hanna/systemd-cloudwatch-logs-tutorial.md
Forward systemd service logs to AWS Cloudwatch

Introduction

I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.

Steps

Overall, it's a fairly simple process consisting of the following few steps.

1. Modify the service file

Open the service file with $ sudo vi /lib/systemd/system/{name}.service

Modify the [Service] section:

@vikashvverma
vikashvverma / npm-cheat-sheet.md
Last active February 19, 2016 18:25 — forked from AvnerCohen/npm-cheat-sheet.md
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

@vikashvverma
vikashvverma / My java implementation of programming assignment #5 of coursera Design and Analysis of Algorithm
Last active December 20, 2015 14:49
Solution of Programming assignment #5 of coursera design and analysis of algorithm. For solution of other programming problems visit http://vikash-thiswillgoaway.blogspot.com Follow @ http://vikash-thiswillgoaway.blogspot.com @ http://www.facebook.com/vikashvverma
import java.io.File;
import java.util.Scanner;
/**
*
* @author VIK VIKASH VIKASHVVERMA VIKKU
* @website http://vikash-thiswillgoaway.blogspot.com
*/
public class Dijkstra {
@vikashvverma
vikashvverma / DetectCycle.java
Created April 22, 2013 11:18
CapgeminiTechChallenge:Level3 (CarConstructionCompany)
import java.util.HashSet;
/**
* The program does not use proper approach, It is just a trick to score a reasonable marks on the challenge.
* The trick works upto certain extent, don't rely on this and develop the whole program on your own.
*
* @author VIK VIKKU VIKASH VIKASHVVERMA
* @website http://vikash-thiswillgoaway.blogspot.com
@vikashvverma
vikashvverma / RoadConstruction.java
Created April 22, 2013 11:12
CapgeminiTechChallenge:Leve2(RoadConstruction)
/**
*
*
* @author VIK VIKKU VIKASHVVERMA
* @website http://vikash-thiswillgoaway.blogspot.com
*/
public class RoadConstruction {
public static int minimum_weight(String[] input1, int[] input2) {
@vikashvverma
vikashvverma / Level1.java
Last active December 16, 2015 12:19
CapgeminiTechChallenge:Level1
/**
*
* @author VIK VIKKU VIKASH VIKASHVVERMA
* @website vikash-thiswillgoaway.blogspot.in
*/
import java.io.*;
public class Level1
{
public static int median(int[] input1,int[] input2)
@vikashvverma
vikashvverma / MergeSort.java
Created April 8, 2013 14:33
Merge Sort program in JAVA... :D
/**
*
* @author VIK VIKKU VIKASHVVERMA VIKASH
* @since April 8, 2013
* @Website: http://vikash-thiswillgoaway.blogspot.com
*
*/
public class MergeSort {
@vikashvverma
vikashvverma / bitsindri.html
Created April 8, 2013 14:30
Blogger Template of BIT Sindri ( http://sindri-bit.blogspot.com )... :D
<!DOCTYPE html>
<html dir="ltr" lang="en-US"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta charset="UTF-8"/>
<meta content="" name="description"/>
<link href="http://www.bitsindri.ac.in/media/com_favicon/icons/1/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<title>BIT Sindri | Home Page</title>
<meta name="description" content="Vikku"/>
@vikashvverma
vikashvverma / sumofsub.c
Created April 8, 2013 14:28
This program implement sum of subset algorithm in C... :D
#include<stdio.h>
void sumOfSub(int,int,int);
static int m=0;
int*w;
int*x;
void main()
{ int i=0,sum=0,n=0;
printf("Enter size of array: ");
scanf("%d",&n);
@vikashvverma
vikashvverma / SumOfSubsets.java
Created April 8, 2013 14:26
This program implements sum of subset algorithm in java... :D
import java.util.Scanner;
/**
*
* @author VIK VIKKU VIKASHVVERMA VIKASH
* @since April 8, 2013
* @Website: http://vikash-thiswillgoaway.blogspot.com
*
*/