Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
(() => { | |
const q = (e, s) => e.querySelector(s); | |
const qA = (e, s) => e.querySelectorAll(s); | |
const num = e => parseInt(e.nextSibling.wholeText.trim()) | |
const d = document.querySelector('.js-discussion.js-socket-channel'); | |
/* uncomment one of these to sort by */ | |
const sortBy = '+1'; | |
// const sortBy = '-1'; | |
// const sortBy = 'smile'; |
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" |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
#!/bin/bash | |
# -------------------------------- | |
# Totally Simple Web Server (TSWS) | |
# -------------------------------- | |
# | |
# (c) 2015 Dave Fletcher | |
# All Rights Reserved | |
# | |
# This is free and unencumbered software released into the public domain. |
#!/bin/bash | |
# ================================================================================== # | |
# Focus the next window on the current workspace in i3, e.g. for binding to Alt+Tab # | |
# Depends: jq, awk, i3wm (obviously) # | |
# Author: Nervengift <dev@nerven.gift> # | |
# License: Don't think this deserves a license, Public Domain # | |
# Known bugs: doesn't work with non-window container focused # | |
# ================================================================================== # | |
ws=$(i3-msg -t get_workspaces|jq "map(select(.focused))[]|.name") |
#cloud-config | |
coreos: | |
etcd: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new | |
discovery: https://discovery.etcd.io/<token> | |
# multi-region deployments, multi-cloud deployments, and droplets without | |
# private networking need to use $public_ipv4 | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 |
Instructions for trying ext4+overlay with docker! In an up-to-date SDK: | |
Write the following to /build/amd64-usr/etc/portage/package.keywords/overlay | |
sys-kernel/coreos-sources | |
sys-kernel/coreos-kernel | |
sys-fs/btrfs-progs | |
app-emulation/docker | |
In src/scripts make the following change to switch to ext4: |
// Gulp 4 | |
var gulp = require('gulp'); | |
var using = require('gulp-using'); | |
var grep = require('gulp-grep'); | |
var changed = require('gulp-changed'); | |
var del = require('del'); | |
var coffee = require('gulp-coffee'); | |
var less = require('gulp-less'); | |
var coffeelint = require('gulp-coffeelint'); | |
var sourcemaps = require('gulp-sourcemaps'); |
// This systemd runs iptables-restore on boot: | |
[Unit] | |
Description=Packet Filtering Framework | |
DefaultDependencies=no | |
After=systemd-sysctl.service | |
Before=sysinit.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.