Skip to content

Instantly share code, notes, and snippets.

View itsprdp's full-sized avatar

Pradeep Gangadharaiah itsprdp

View GitHub Profile
@itsprdp
itsprdp / disable_jenkins.groovy
Last active October 31, 2022 08:48
Groovy script to disable all jenkins jobs in a view
jenkins = Hudson.instance
jenkins.instance.getView("PS_Portal").items.each { job ->
println "\nJob: $job.name"
job.disabled = true
}
@itsprdp
itsprdp / JIRA_SEARCH_FILTER
Last active March 15, 2018 16:37
JIRA Weekly Report Gen script
project = <project_id> AND Sprint = <sprint_id_here> ORDER BY created ASC
@itsprdp
itsprdp / auditor.proto
Last active October 27, 2017 23:53
Auditor service proto file and sample data
syntax = "proto3";
/*
Auditor service to capture all the papertrail or audited
gem records from various applications in one place so that
the reads are faster and removed the overhead of the storage
*/
service AuditorService {
/* Endpoint to capture audit entries */
@itsprdp
itsprdp / pg_hba.conf
Created May 27, 2017 10:20
Postgres conf
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
@itsprdp
itsprdp / .ruby-version
Last active September 20, 2017 02:43
Inc 5000 companies list scraper https://www.inc.com/inc5000/list/2016/
ruby-2.2.1@inc_scraper
@itsprdp
itsprdp / Dockerfile
Last active March 24, 2017 09:08
Ruby 2.2.0 + Nginx + Passenger + Pagespeed base image
FROM debian:latest
MAINTAINER PG <itsprdp@gmail.com>
RUN apt-get update -qq \
&& apt-get install -y build-essential curl less vim g++ libcurl4-openssl-dev zlib1g-dev \
libpcre3 libpcre3-dev unzip wget sudo libxml2-dev libxslt1-dev nodejs git libmysqlclient-dev \
libssl-dev libreadline-dev libgdbm-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN wget https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.6.tar.gz \
@itsprdp
itsprdp / pg.md
Created March 12, 2017 12:59 — forked from benschwarz/pg.md
Awesome postgres
@itsprdp
itsprdp / .env
Last active December 23, 2022 07:19
Golang MySQL ORM Example
MYSQL_USER="root"
MYSQL_PASSWORD=""
MYSQL_DBNAME="gorm_test"
MYSQL_PROTOCOL="tcp"
MYSQL_HOST="127.0.0.1"
MYSQL_PORT="3306"
@itsprdp
itsprdp / js_precompile_assets_debugger.rb
Created September 23, 2016 14:18
Rails JS precompile assets debugger
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
Warden::Manager.serialize_into_session{|user| user.id }
Warden::Manager.serialize_from_session{|id| User.get(id) }
Warden::Manager.before_failure do |env,opts|
# Sinatra is very sensitive to the request method
# since authentication could fail on any type of method, we need
# to set it for the failure app so it is routed to the correct block
env['REQUEST_METHOD'] = "POST"
end