This is an script to download CVE notes from Grafeas. Could be really handy if you need to populate your Grafeas instance with some initial information
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
| docker run -e POSTGRES_PASSWORD=password -e POSTGRES_USER=postgres -p 5432:5432 -d postgres | |
| curl -X POST "http://localhost:8080/v1beta1/projects" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"projects/user\"}" | |
| curl -X POST "http://localhost:8080/v1beta1/projects/user/notes?note_id=commonrfq" -H "accept: application/json" -H "Content-Type: application/json" -d @note.json | |
| curl -X POST "http://localhost:8080/v1beta1/projects/user/occurrences" -H "accept: application/json" -H "Content-Type: application/json" -d @ocurrence.json |
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
| kubectl exec -it my-app-c456bf7c5-tl6cf -- cat /var/jenkins_home/secrets/initialAdminPassword | |
| docker run jenkins/jnlp-slave -url http://jenkins-server:port <secret> <agent name> | |
| kubectl run my-app --image=jenkins/jenkins:lts --port=8080 --port=50000 | |
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
| harvester_buffer_size: 66384 | |
| multiline.pattern: 'Started by user ' | |
| multiline.negate: true | |
| multiline.match: after | |
| multiline.max_lines: 255000 | |
| multiline.timeout: 250s | |
| multiline.flush_pattern: 'Finished: ' |
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
| for f in *; do t=$(echo $f | sed -E 's/[-. mov]//g'); touch -mt 201906211300 $f; done | |
| #for f in *; do t=$(echo $f | sed -E 's/[-. mov]//g'); touch -mt YYYYMMDDHHMM $f; done |
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 label = "mypod-${UUID.randomUUID().toString()}" | |
| podTemplate(label: label, cloud: 'myKubernetesCluster', | |
| containers:[ | |
| containerTemplate(name: 'jnlp', | |
| alwaysPullImage: true, | |
| resourceRequestMemory: '4Gi', | |
| resourceLimitMemory: '4Gi', | |
| resourceRequestCpu: '1000m', resourceLimitCpu: '1000m', | |
| workingDir: '/home/jenkins/workspace', |
#Install Docker & Docker Compose - Centos 7
Step 1 — Install Docker Install needed packages:
$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Configure the docker-ce repo:
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
| https://unix.stackexchange.com/questions/174379/how-can-i-create-a-virtual-output-in-pulseaudio | |
| You can add a sink with | |
| pacmd load-module module-null-sink sink_name=MySink | |
| pacmd update-sink-proplist MySink device.description=MySink | |
| You can add a loopback device with the command | |
| pacmd load-module module-loopback sink=MySink |
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
| Preparing to unpack .../linux-sound-base_1.0.25+dfsg-0ubuntu5_all.deb ... | |
| Unpacking linux-sound-base (1.0.25+dfsg-0ubuntu5) ... | |
| Selecting previously unselected package alsa-base. | |
| Preparing to unpack .../alsa-base_1.0.25+dfsg-0ubuntu5_all.deb ... | |
| Unpacking alsa-base (1.0.25+dfsg-0ubuntu5) ... | |
| Selecting previously unselected package alsa-utils. | |
| Preparing to unpack .../alsa-utils_1.1.3-1ubuntu1_amd64.deb ... | |
| Unpacking alsa-utils (1.1.3-1ubuntu1) ... | |
| Selecting previously unselected package alsa-tools. | |
| Preparing to unpack .../alsa-tools_1.1.3-1_amd64.deb ... |
The idea of use the native permissions from Linux on the containers will work, because when the container is running it acts as a normal Linux machine, respecting the user/groups permissions.
Using the next Dockerfile as an example
# I'm using the ubuntu image only for testing porpouse, the same will apply for RHEL
FROM ubuntu
# Switch to root