Skip to content

Instantly share code, notes, and snippets.

@varver
varver / sentry_issue_api.py
Created February 20, 2019 06:18
Fetch issues from sentry with highest frequency in 14 days
### READ ME :::)
# You can fetch issues with highest frequeny from sentry using this script.
# It will fetch top 100 issues and some meta information related to that issue.
# And write everything is a csv file separated with "~"
# you can change environment=production in the URL used to make api call below. Please refer your project to see environment options available.
#### IMPO :: please change token and your organization URL/Project_Name (org_and_project) below :
import json
import requests
import csv
@varver
varver / redshift_connect.py
Created February 15, 2017 11:02
Python script to connect with Redshift on AWS with SCHEMA support.
############ REQUIREMENTS ####################
# sudo apt-get install python-pip
# sudo apt-get install libpq-dev
# sudo pip install psycopg2
# sudo pip install sqlalchemy
# sudo pip install sqlalchemy-redshift
##############################################
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
@varver
varver / .Title
Created November 29, 2016 21:57 — forked from congjf/.Title
Using MongoDB in golang with mgo
Using MongoDB in golang with mgo
@varver
varver / geospatial-querying-with-go-and-mongodb.go
Last active November 26, 2016 22:37 — forked from icchan/geospatial-querying-with-go-and-mongodb.go
Geospatial Querying with GoLang and MongoDB
package main
import (
"encoding/json"
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"log"
)
@varver
varver / golang_job_queue.md
Created September 12, 2016 20:59 — forked from harlow/golang_job_queue.md
Job queues in Golang
@varver
varver / get_image_size.go
Created September 4, 2015 13:02
Get size and format of any image present online or on disk in golang (go)
package main
import (
"bytes"
"fmt"
"github.com/varver/rextro"
_ "golang.org/x/image/bmp"
_ "golang.org/x/image/webp"
"image"
_ "image/gif"
package main
import (
"fmt"
)
func decorator(f func(s string)) func(s string) {
return func(s string) {
fmt.Println("Started")
@varver
varver / pprof.go
Created May 11, 2015 12:50
Profiling go code with pprof , example .
package main
import (
"fmt"
"runtime"
"sync"
"github.com/davecheney/profile"
)
func main() {
package main
import (
"os"
"encoding/xml"
"strings"
"log"
"runtime/debug"
)
@varver
varver / cookie_jar_golang.go
Last active June 7, 2022 13:04
Login to a website with this golang code using persistent cookies or cookie jar .