Skip to content

Instantly share code, notes, and snippets.

View ninadpchaudhari's full-sized avatar
:shipit:

Ninad P.Chaudhari ninadpchaudhari

:shipit:
View GitHub Profile
https://www.surveymonkey.com/r/VPH5733
Squash last X Commits. : https://stackoverflow.com/a/5190323/3262852
use --force if already pushed to github
2) Reset all local changes & reset to one from Github : https://stackoverflow.com/a/8888015/3262852
3) Create, apply patches https://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit
@ninadpchaudhari
ninadpchaudhari / parser.py
Last active February 4, 2024 10:13 — forked from hreeder/parser.py
Forked : Python nginx Log Parser <<Modified>> : Parsed & normalized the datetime string to native python objects
#!/usr/bin/env python
import gzip
import os
import sys
import re
from datetime import datetime
import pytz
tz = pytz.timezone('UTC')
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Image-only Example - Record Plugin for Video.js</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link href="http://vjs.zencdn.net/5.8.8/video-js.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/videojs-record/2.1.0/css/videojs.record.css" rel="stylesheet">
<script
src="http://code.jquery.com/jquery-3.3.1.min.js"
@ninadpchaudhari
ninadpchaudhari / stream.py
Created February 19, 2018 21:22
py stream
'''
This codes crawls the tweets in SanFrancisco area from Twitter.
Jan 11, 2014
Feng Chen
'''
import tweepy # twitter api module - python version
import datetime # python datetime module
import json # python json module
@ninadpchaudhari
ninadpchaudhari / Bucket policy
Created February 14, 2018 22:02
S3 Policy to make content in Bucket public by default
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "MakeItPublic",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<Your Bucket Name here>/*"
}
@ninadpchaudhari
ninadpchaudhari / lab content
Last active March 23, 2018 05:35
Lab conent
pom.xml :
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- JSTL -->
<dependency>
#!/bin/sh
now=$(date)
echo "[ $now ] Statring Post-Receive \n" > /var/www/vit.myjournals.cu.cc/logs$
echo "Starting Post-receive"
unset GIT_INDEX_FILE
git --work-tree=/var/www/vit.myjournals.cu.cc/app --git-dir=/var/repo/vit.myj$
cd /var/www/vit.myjournals.cu.cc/app
echo "Correcting owners"
chown -R ninad:www-data *
@ninadpchaudhari
ninadpchaudhari / local.conf
Last active September 11, 2015 22:04
local.conf for installation of OpenStack using DevStack on master/kilo
[[local|localrc]]
ADMIN_PASSWORD=secrete
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50
#trying to use Github instead of openstack git
GIT_BASE=https://github.com
@ninadpchaudhari
ninadpchaudhari / 98-mylog
Last active March 28, 2024 19:18 — forked from navhaxs/99-keepwanalive
openwrt wan auto reconnect hotplug script
#!/bin/sh
#File for my debugging purposes
echo $ACTION >> /tmp/mylog
echo $INTERFACE >> /tmp/mylog
echo "" >> /tmp/mylog