Skip to content

Instantly share code, notes, and snippets.

View AaronDMarasco-VSI's full-sized avatar
💭

Aaron D. Marasco AaronDMarasco-VSI

💭
  • Maryland
View GitHub Profile
@AaronDMarasco-VSI
AaronDMarasco-VSI / compress_spans.sh
Created January 25, 2019 13:59
Clean up LibreOffice FODP files
#!/bin/bash
# There are many times OpenOffice / LibreOffice will put in useless spans.
# What it does:
# Finds a span with a style that has the format <capital letter><1 or more digits>
# Finds the close tag and then looks to see if the NEXT span has the same style defined
# If they match, the first end and the second begin are stripped
# (This is why it has to loop repeatedly, a third won't be seen unless a fourth - they
# would match as well)
[ "$1" == '' ] && echo "No parameters given: try '$0 *' or '$0 *fodp'"
@AaronDMarasco-VSI
AaronDMarasco-VSI / Jenkinsfile_snippet.groovy
Created November 8, 2018 16:17
Jenkins detecting changes
// Field ~~ global variable
import groovy.transform.Field
@Field previous_changesets
properties properties: [ // This is ugly https://stackoverflow.com/a/35471196
// ....
parameters([
// ....
booleanParam(defaultValue: false, description: 'Force Rebuild (Job normally aborts for various reasons, e.g. no applicable source changes)', name: 'Force Rebuild'),
]),
@AaronDMarasco-VSI
AaronDMarasco-VSI / gist:6dff0eabac9b4fec31b60dc443eec2bc
Created November 1, 2018 15:42
Stop running Jenkins jobs (not queued)
// Not sure if this worked or timed out...
def buildingJobs = Jenkins.instance.getAllItems(Job.class).findAll { it.isBuilding() }
buildingJobs.each { job->
if (job.name =~ /build_assets/) {
println(job.name)
job._getRuns()[-1].doStop()
}
}
@AaronDMarasco-VSI
AaronDMarasco-VSI / .bashrc
Created October 19, 2018 16:37
Useful git alias to put in .bashrc
# Usage: git diff -b `fork_point`
# or git diff -b `fork_point develop`
fork_point() {
upstream=$1
git merge-base --fork-point ${upstream:-"origin/master"} HEAD
}
#!/bin/bash
# Note: The job "Maintenance/Branch_Check_Configure" needs to be re-run whenever this file is changed!
declare -A merged
declare -A ignores
declare -A aliases
declare -A authors
declare -A authors_delete
ignores[master]=1
@AaronDMarasco-VSI
AaronDMarasco-VSI / gist:0a4a22ecd90baca49cae3f682421b603
Last active October 18, 2018 12:28
CentOS 7.1 is a PITA with /etc/redhat-release
$ for img in bdobyns/centos4.6_i386 fatherlinux/centos4-base gpmidi/centos-{5.{0..10},6.{0..5}} astj/centos5-vault centos:6.{6,7,8,9,10} centos:7.{0.1406,1.1503,2.1511,3.1611,4.1708,5.1804} fedora:{26,27,28,29,rawhide}; do echo -n "$img: "; docker run --rm ${img} cat /etc/redhat-release; done
bdobyns/centos4.6_i386: CentOS release 4.6 (Final)
fatherlinux/centos4-base: CentOS release 4.8 (Final)
gpmidi/centos-5.0: CentOS release 5 (Final)
gpmidi/centos-5.1: CentOS release 5 (Final)
gpmidi/centos-5.2: CentOS release 5.2 (Final)
gpmidi/centos-5.3: CentOS release 5.3 (Final)
gpmidi/centos-5.4: CentOS release 5.4 (Final)
gpmidi/centos-5.5: CentOS release 5.5 (Final)
gpmidi/centos-5.6: CentOS release 5.6 (Final)
--- src/patchelf.cc.orig 2015-09-23 14:32:37.245849869 -0400
+++ src/patchelf.cc 2015-09-23 14:49:41.719109921 -0400
@@ -970,6 +970,25 @@
return;
}
+ if (soname)
+ debug("current SONAME is '%s'\n", soname);
+
+ if (soname and newSoname == "OCPI") {