Skip to content

Instantly share code, notes, and snippets.

Juan judavi

Block or report user

Report or block judavi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build-and-run.log
[judavi@grafeas grafeas]$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# go/v1beta1/main/config.yaml
nothing added to commit but untracked files present (use "git add" to track)
[judavi@grafeas grafeas]$ make
# protoc and tools need to be run before all of the other generations.
go generate ./protoc
@judavi
judavi / Readme.md
Last active Aug 22, 2019
Download CVE notes from Grafeas API in Google Container registry
View Readme.md

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

@judavi
judavi / fillGrafeas.sh
Last active Aug 16, 2019
Grafeas Insert Test Data
View fillGrafeas.sh
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
@judavi
judavi / commands.sh
Last active Aug 12, 2019
Jenkins EKS
View commands.sh
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
@judavi
judavi / filebeat.yml
Created Jul 18, 2019
All lines filebeat
View filebeat.yml
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: '
@judavi
judavi / script.sh
Created Jun 28, 2019
Change creation date of all files in directory MacOS
View script.sh
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
@judavi
judavi / groovy.groovy
Created Apr 10, 2019
Jenkins Start new node/agent container and send emails
View groovy.groovy
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',
@judavi
judavi / Readme.md
Created Apr 7, 2019
Install Docker-ce CentOS or RHEL
View Readme.md

#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:

View gist:2f2289596f34d3cc87be21a2be082875
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
View log.log
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 ...
You can’t perform that action at this time.