Skip to content

Instantly share code, notes, and snippets.

View lcasat's full-sized avatar

Satheshkumar T lcasat

  • Fourkites Inc
  • Chennai India
View GitHub Profile
@lcasat
lcasat / find_unused_jobs.groovy
Created January 2, 2024 06:24 — forked from daniilyar/find_unused_jobs.groovy
Jenkins Groovy script to find unused jobs. Unused means 'not built for more than X days'
import jenkins.model.Jenkins
import jenkins.model.JenkinsLocationConfiguration
String jobNameRegexp = ".*"
long maxThresholdDays = 60; // days
boolean ignoreDisabledJobs = true
def getLastBuildTime(Job job) {
def lastBuild = job.getLastBuild()
if(lastBuild == null) {
@lcasat
lcasat / letsencrypt_2020.md
Created November 11, 2022 06:08 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@lcasat
lcasat / README.md
Created December 5, 2019 12:30
AWS Gettings started with Cloud9 + EC2 + MySQL + phpMyAdmin

Prerequisits

Please create a Cloud9 instance in your favorite region. Also create a RDS MySQL instance.

Installing PHP 7.1

Remove current Apache & PHP

sudo yum remove httpd* php*

Install additional commonly used PHP packages for PHP 7.1

@lcasat
lcasat / detect_evil_merge.sh
Created May 10, 2019 07:43 — forked from smileyborg/detect_evil_merge.sh
Two scripts that can be used to detect evil merges in Git. See http://stackoverflow.com/questions/27683077
#!/bin/bash
# A shell script to provide a meaningful diff output for a merge commit that can be used to determine whether the merge was evil.
# The script should be run from outside the git repository, with two arguments:
# 1 - the directory of the git repository
# 2 - the SHA for the merge commit to inspect
# The script will output one file:
# - the merge redone fresh without any conflicts resolved, diff'ed to the actual merge
output_file="diff.txt"
@lcasat
lcasat / curl.md
Created May 18, 2018 07:31 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.