- Boot into recovery
- Open a terminal (
Utilities > Terminal) - Disable SIP using
csrutil disable - Reboot into macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "strings" | |
| "path/filepath" | |
| ) | |
| func fileNameWithoutExtension(fileName string) string { | |
| return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
| } |
- Install XQuartz: https://www.xquartz.org/
- Launch XQuartz. Under the XQuartz menu, select Preferences
- Go to the security tab and ensure "Allow connections from network clients" is checked.
- Run
xhost + ${hostname}to allow connections to the macOS host * - Setup a HOSTNAME env var
export HOSTNAME=`hostname`* - Add the following to your docker-compose:
environment:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Related to https://issues.jenkins-ci.org/browse/JENKINS-26481 | |
| abcs = ['a', 'b', 'c'] | |
| node('master') { | |
| stage('Test 1: loop of echo statements') { | |
| echo_all(abcs) | |
| } | |
| stage('Test 2: loop of sh commands') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
| They are error checkers, so use them only when err != nil, and you want to handle | |
| specific errors in a different way! | |
| Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
| for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
| "file does not exist/directory does not exist" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # where to store the sparse-image | |
| WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
| create() { | |
| hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
| } | |
| detach() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}` | |
| SCRIPT_DIR=`cd $SCRIPT_DIR && pwd` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def m = "1234 abc" =~ /^(\d+)/ | |
| def n = "abc 1234" =~ /^(\d+)/ | |
| println (m.find()?m.group():"not matched") | |
| println (n.find()?n.group():"not matched") | |