Skip to content

Instantly share code, notes, and snippets.

@MAS150MD200
MAS150MD200 / Jenkinsfile
Created August 28, 2019 15:27 — forked from ysegorov/Jenkinsfile
Jenkinsfile example
#!/usr/bin/env groovy
// https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy
// http://stackoverflow.com/a/40294220
// https://JENKINS_HOST/scriptApproval/ - for script approval
import java.util.Date
def isMaster = env.BRANCH_NAME == 'master'
def isDevelop = env.BRANCH_NAME == 'develop'
@MAS150MD200
MAS150MD200 / Jenkinsfile
Created April 4, 2019 12:07 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@MAS150MD200
MAS150MD200 / Jenkinsfile.groovy
Created February 25, 2019 22:11 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@MAS150MD200
MAS150MD200 / quicktime-hangouts-recording.md
Created September 20, 2018 13:47 — forked from caseywatts/quicktime-hangouts-recording.md
Quicktime Hangouts Recording (using soundflower for audio)

Short link to this page: caseywatts.com/quicktime

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

  • the system output audio (from them)
  • the microphone audio (from you)
@MAS150MD200
MAS150MD200 / Jenkinsfile
Created August 20, 2018 13:01 — forked from HarshadRanganathan/Jenkinsfile
Jenkins Declarative Pipeline Example
def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
@MAS150MD200
MAS150MD200 / exercise.tour.go
Created July 20, 2018 23:24 — forked from zyxar/exercise.tour.go
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
@MAS150MD200
MAS150MD200 / prometheus-rules.yml
Created July 6, 2018 10:31 — forked from mjf/prometheus-rules.yml
Prometheus Recoding and Alert Rules Collection
# Prometheus Recoding and Alert Rules Collection
# Copyright (C) 2017 Matous Jan Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
groups:
- name: node_common
interval: 30s
rules:
@MAS150MD200
MAS150MD200 / prometheus.md
Created June 14, 2018 13:27 — forked from petarnikolovski/prometheus.md
Prometheus 2.x installation on Ubuntu 16.04 server.

Installing Prometheus on Ubuntu 16.04

This gist is a compilation of two tutorials. You can find the original tutorials here and here. What should you know before using this? Everything can be executed from the home folder. For easier cleanup at the end you can make directory where you'll download everything, and then just use rm -rf .. Although, you should be careful. If some strange bugs arise unexpectedly somewhere sometimes, just keep in mind that some user names have underscores in them (this is probably nothing to worry about).

Create Users

sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Prometheus Monitoring User" prometheus
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Node Exporter User" node_exporter
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Alertm
@MAS150MD200
MAS150MD200 / README.md
Created May 17, 2018 16:16 — forked from smileart/README.md
My ZSH Theme — Agnoster Mod

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@MAS150MD200
MAS150MD200 / README.md
Created May 17, 2018 16:15 — forked from lborg019/README.md
Fine tuning smileart's zsh agnoster theme:

lukezin's .zsh-theme

Improvements to smileart's agnoster theme mod:

  • Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
  • Prompt is shorter, shows only the current directory
  • LS Colors match iTerm's Dark Solarized theme

to do:

  • Fix tab completion: tab completion should automatically work on special characters (such as [) right now you have to escape such characters for tab to complete it \[