Skip to content

Instantly share code, notes, and snippets.

View svanoort's full-sized avatar

Sam Van Oort svanoort

  • Toronto, ON, Canada
View GitHub Profile
@jglick
jglick / uc-grep
Last active January 27, 2023 07:06
#!/bin/bash
PLUGIN=$1
VERSION=$2
UC=$3
if [ -z "$PLUGIN" ]
then
echo 'Usage: uc-grep short-name [core-version [https://jenkins-updates.cloudbees.com/update-center/envelope-core-mm/]]'
exit 1
fi
if [ -z "$VERSION" ]
@cyrille-leclerc
cyrille-leclerc / jenkins-workflow.groovy
Last active August 31, 2023 21:52
Jenkins Docker Workflow - Deploy Game Of Life to Amazon EC2 Container Service / ECS
docker.withRegistry('', 'dockerhub-credentials-cleclerc') {
writeFile file: "${pwd()}/.m2/settings.xml", text: "<settings><localRepository>${pwd()}/.m2/repo</localRepository></settings>"
stage 'Build Web App'
docker.image('cloudbees/java-build-tools:0.0.5').inside {
git 'https://github.com/cyrille-leclerc/game-of-life.git'
sh "mvn -B -V -s ${pwd()}/.m2/settings.xml clean package"
}
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@sloria
sloria / bobp-python.md
Last active April 20, 2024 13:02
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: