Skip to content

Instantly share code, notes, and snippets.

View vedarthk's full-sized avatar
🛠️
building...

Vedarth Kulkarni vedarthk

🛠️
building...
View GitHub Profile
@slmingol
slmingol / IAM Permissions List.md
Created September 15, 2019 20:43 — forked from mechcozmo/IAM Permissions List.md
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)
@paolocarrasco
paolocarrasco / README.md
Last active June 7, 2024 22:59
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@ftclausen
ftclausen / Jenkinsfile
Created April 13, 2017 05:36
Jenkins pipeline - An approach to get all commits since the last successful build.
// -*- mode: groovy -*-
// vim: set filetype=groovy :
node( 'some_node' ) {
stage( "Phase 1" ) {
sshagent( credentials: [ 'some_creds' ] ) {
checkout scm
def lastSuccessfulCommit = getLastSuccessfulCommit()
def currentCommit = commitHashForBuild( currentBuild.rawBuild )
if (lastSuccessfulCommit) {
@mechcozmo
mechcozmo / IAM Permissions List.md
Last active May 28, 2024 22:58
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)
# to get a list of DS instances
aws ec2 describe-instances --output text | grep Name |grep ds | awk '{print $NF}'
# aws ec2 describe-instances --filters 'Name=tag:Name,Values=*.ds'
# aws ec2 describe-instances --filters 'Name=tag:Cluster,Values=dsclusterprod1' --output text | grep -w Name
aws ec2 describe-instances --filters 'Name=tag:Cluster,Values=dsclusterprod1' --output text | grep -w Name | awk '{print $NF}' > ds.instances
aws ec2 describe-instances --filters 'Name=tag:Cluster,Values=dsclusterstg1' --output text | grep -w Name | awk '{print $NF}' >> ds.instances
## to get instanceid of instances:
for instance in `cat ds.instances`;
@kracekumar
kracekumar / auto-remove.el
Last active June 17, 2022 11:16
Emacs auto remove unused import statements in current python file
;;; auto-remove.el --- Auto remove unused functions in python
;;; Commentary:
;; Uses external tool autoflake to remove unused imports from a Python file.
;;; Code:
(defcustom python-autoflake-path (executable-find "autoflake")
"Autoflake executable path.
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,