Skip to content

Instantly share code, notes, and snippets.

@iamvivekkaushik
iamvivekkaushik / main.go
Created July 24, 2022 17:02 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
# for live streaming using vlc using rtsp
rtsp://<ip-here>/cam/realmonitor?channel=01&subtype=00
<VirtualHost *:80>
DEFINE BASE /home/ubuntu/project
DEFINE STATIC /home/ubuntu/project/static
DEFINE MEDIA /home/ubuntu/project/media
DEFINE PROCESS_NAME appname
DEFINE INTERNAL Project_Name
ServerName example.com
ServerAdmin no-reply@example.com
@iamvivekkaushik
iamvivekkaushik / mysql_setup.md
Last active May 13, 2020 05:46
Install MySQL on Ubuntu 18.04

First Install MySQL on your ubuntu server

  sudo apt install mysql-server

Create new MySQL user

Login to MySQL and create a new user with the following command

@iamvivekkaushik
iamvivekkaushik / APIErrorListener.java
Last active September 17, 2019 14:41
Helper classes to be used with (DRF-Android)[https://github.com/101Loop/DRF-Android]
package com.example.drfUser;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import com.android.volley.VolleyError;
import com.civilmachines.drfapi.DjangoErrorListener;
import org.json.JSONObject;
@iamvivekkaushik
iamvivekkaushik / temp.sh
Created August 28, 2019 08:47
Linux bash script to display temprature every second.
while true; do sensors ; sleep 1; clear ; done
@iamvivekkaushik
iamvivekkaushik / README.md
Created March 22, 2019 04:27 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha: