Skip to content

Instantly share code, notes, and snippets.

View Justin-Schmitz's full-sized avatar

Justin Schmitz Justin-Schmitz

View GitHub Profile
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active May 10, 2025 14:55
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@leonardofed
leonardofed / README.md
Last active May 8, 2025 09:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@dwilkie
dwilkie / docker-cheat-sheat.md
Last active May 12, 2024 14:08
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

#from post
#http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images
#Delete stopped (exited) containers:
docker ps --no-trunc -aqf "status=exited" | xargs docker rm
#Delete unused (dangling) images:
docker images --no-trunc -aqf "dangling=true" | xargs docker rmi
@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@abayer
abayer / Jenkinsfile
Created February 15, 2017 15:17
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@gergo-dryrun
gergo-dryrun / policy.yaml
Created March 19, 2017 17:37
Chaining FN::Sub/Select/Split/Ref
LambdaRolePolicies:
Type: AWS::IAM::Policy
Properties:
PolicyName: es-http-permissions
PolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Action:
MAX_BUILDS = 5
MAX_ENV_BUILDS = 2
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob.class).each { it ->
def job = Jenkins.instance.getItemByFullName(it.fullName, Job.class)
def limit = (it.fullName =~ /^environment/) ? MAX_ENV_BUILDS : MAX_BUILDS
def recent = job.getBuilds().limit(limit)
println "Processing job " + it.fullName + " " + it.class + " BuildCount: " + job.getBuilds().size() + " Limit: " + limit
@soerenmartius
soerenmartius / jenkins-kill-jobs-for-a-specific-project.groovy
Created June 28, 2017 12:09
jenkins kill all jobs for a specific project
import hudson.model.FreeStyleBuild
import hudson.model.Result
import hudson.model.Run
import jenkins.model.Jenkins
import org.jenkinsci.plugins.workflow.job.WorkflowRun
import org.jenkinsci.plugins.workflow.support.steps.StageStepExecution
if(!binding.hasVariable('dryRun')) {
dryRun = true
}
@abstractart
abstractart / books.md
Last active February 28, 2025 11:33
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ