You might want to add some service account to ClusterRoleBinding/psp:privileged
kubectl apply -f eks-restricted-psp.yml
# delete default role binding
kubectl delete clusterrolebinding eks:podsecuritypolicy:authenticated| aws ec2 describe-subnets | jq '[ .Subnets[] | {name: (.Tags[] | select(.Key == "Name") | .Value), id: .SubnetId} ] | sort_by(.name) | .[] | (.id + " " + .name)' |
| { | |
| "workbench.colorCustomizations": { | |
| "[Default Dark+]": { | |
| "focusBorder": "#404552", | |
| "foreground": "#D3DAE3", | |
| "button.background": "#383C4A", | |
| "button.foreground": "#FFF", | |
| "input.border": "#F5F6F7", | |
| "input.background": "#393f4c", | |
| "input.foreground": "#FFF", |
| apiVersion: batch/v1beta1 | |
| kind: CronJob | |
| metadata: | |
| name: backup | |
| namespace: jenkins | |
| spec: | |
| schedule: 0 17 * * * # 00:00 GMT+7 | |
| successfulJobsHistoryLimit: 5 | |
| failedJobsHistoryLimit: 5 | |
| jobTemplate: |
You might want to add some service account to ClusterRoleBinding/psp:privileged
kubectl apply -f eks-restricted-psp.yml
# delete default role binding
kubectl delete clusterrolebinding eks:podsecuritypolicy:authenticated| import jenkins.model.Jenkins | |
| Jenkins.instanceOrNull.allItems(hudson.model.Job).each { job -> | |
| if (job.isBuildable() && job.supportsLogRotator() && job.getProperty(jenkins.model.BuildDiscarderProperty) == null) { | |
| println "Processing \"${job.fullDisplayName}\"" | |
| try { | |
| job.setBuildDiscarder(new hudson.tasks.LogRotator ( 14, -1, 14, -1)) | |
| println "${job.fullName} is updated" | |
| } catch (Exception e) { | |
| // Some implementation like for example the hudson.matrix.MatrixConfiguration supports a LogRotator but not setting it |
| Jenkins.instance.slaves.each { | |
| def comp = it.getComputer() | |
| if (comp.isOffline()) { | |
| comp.doDoDelete() | |
| } | |
| } |
| #!/usr/bin/env python3 | |
| import http.client | |
| import json | |
| import datetime | |
| conn = http.client.HTTPSConnection("services5.arcgis.com") | |
| def main(): | |
| cur_date = datetime.datetime.now().strftime('%Y-%m-%d') |
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "os" | |
| "testing" |
| # need sudo | |
| ffmpeg -device /dev/dri/card0 -f kmsgrab -framerate 60 -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=format=nv12' -c:v hevc_vaapi output-$(date +%s).mp4 | |
| # tested with amdgpu |
| type MatcherNode<T> = { | |
| children: Record<string, MatcherNode<T>>; | |
| glob?: Array<MatcherNode<T>>; | |
| glob2?: Array<MatcherNode<T>>; | |
| value?: T; | |
| }; | |
| // sorry, I exercise here. | |
| class GlobMatcher<T> { | |
| root: MatcherNode<T>; |