Skip to content

Instantly share code, notes, and snippets.

View csullivannet's full-sized avatar

Christopher Sullivan csullivannet

  • Canada
View GitHub Profile
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active June 25, 2025 11:02
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"
@jsynowiec
jsynowiec / thinkpad-dock
Last active October 4, 2021 07:21
[Thinkpad Series 3 docking station scripts] Thinkpad "docking scripts" for Series 3 docking station enabling or disabling both external displays on acpi events (https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt). Only one pair of events should be used - check which ones (IBM/LENOVO/HKEY) acpid daemon receives. #thinkpad #linux #…
# /etc/acpi/events/thinkpad-dock
# This is called when the Thinkpad docks in a series 3 docking station
event=ibm/hotkey HKEY 00000080 00004010
action=/etc/acpi/thinkpad-dock.sh