Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ishan Jain ishanjain28

🎯
Focusing
Block or report user

Report or block ishanjain28

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
View keybase.md

Keybase proof

I hereby claim:

  • I am ishanjain28 on github.
  • I am ishanjain (https://keybase.io/ishanjain) on keybase.
  • I have a public key ASDUjGtFYS3YmjQU5Ij5gwNvm2gsvBgJ0_ZvadS3fF5dugo

To claim this, I am signing this object:

View bse-scrap.go
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@ishanjain28
ishanjain28 / ffmpeg.md
Created Sep 17, 2017 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@ishanjain28
ishanjain28 / ffmpeg.md
Created Sep 17, 2017 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

View bulk.json
This file has been truncated, but you can view the full file.
[
{
"deal_date": "06/09/2017",
"security_code": "534691",
"company": "COMCL",
"client_name": "VINOD VRAJLAL NIRMAL",
"deal_type": "S",
"quantity": "6575",
"price": "32.30"
View db.go
package db
func Init() (*mgo.Session, error) {
db, err := mgo.Dial("localhost:27017")
if err != nil {
return nil, err
}
return db, nil
}
@ishanjain28
ishanjain28 / bsnl-circles-list.json
Created Jul 24, 2017
A list of All Telecom circles and circle codes that BSNL Uses.
View bsnl-circles-list.json
[
{
"CIRCLE_NAME":"Andaman & Nicobar",
"CIRCLE_CODE":"AN",
},
{
"CIRCLE_NAME":"Andhra Pradesh",
"CIRCLE_CODE":"AP",
},
@ishanjain28
ishanjain28 / golang-tls.md
Created Jul 11, 2017 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
View golang-tls.md

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
View gist:0f0fdf8f0de95211bde95dddbd7ab89d

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@ishanjain28
ishanjain28 / color-to-grayscale.go
Created Apr 24, 2017
This Go Program Convert a colored image to a grayscaled version of that image using various algorithims.
View color-to-grayscale.go
package main
import (
"os"
"log"
"image/png"
"fmt"
"image"
"image/color"
"math"
You can’t perform that action at this time.