Skip to content

Instantly share code, notes, and snippets.

package sharding
import (
"os"
"testing"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
dbmocks "github.com/argoproj/argo-cd/v2/util/db/mocks"
"github.com/stretchr/testify/assert"
@akram
akram / kube.sh
Last active October 25, 2019 06:16
#!/bin/bash
# This script takes 1 mandatory parameter: the short gist url and 1 optionnal: the destination
# directory for the donwloaded kubeconfig
# It downloads the kubeconfig file from gist and sets KUBECONFIG variable pointing to it locally
# url is in the form of: https://gist.github.com/287f2ccee282c01e8ffb532763c20a86
# full_url will be : https://gist.githubusercontent.com/<user>/287f2ccee282c01e8ffb532763c20a86/raw/kubeconfig
Full thread dump OpenJDK Server VM (25.191-b12 mixed mode):
"JGit-WorkQueue" #124 daemon prio=5 os_prio=0 tid=0x0caf0800 nid=0x16df waiting on condition [0xceba1000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0xda430f00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
@akram
akram / dc-sa.yaml
Last active April 16, 2018 08:25
DC and SA
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: toto
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: trip-agency
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 7 source files to /home/jboss/source/target/classes
[INFO]
[INFO] --- kie-maven-plugin:6.4.0.Final-redhat-3:build (default-build) @ specialtripsagencyproject ---
[main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - Adding KieModule from resource: FileResource[file=/home/jboss/source/src/main/resources]
[main] WARN org.drools.compiler.kie.builder.impl.ClasspathKieProject - Unable to find pom.properties in /home/jboss/source/src/main/resources
[main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - Recursed up folders, found and used pom.xml /home/jboss/source/pom.xml
[main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added: FileKieModule[releaseId=org.specialtripsagency:specialtripsagencyproject:2.0.1,file=/home/jboss/source/src/main/resources]
[main] WARN org.jbpm.bpm
@akram
akram / .bash_logout
Last active April 26, 2017 10:32
Automatically mount ocp gluster volumes on login
for gluster_mount in $(mount | grep /mnt/gluster | cut -f3 -d " "); do
echo "Demontage du volume $gluster_mount"
sudo umount $gluster_mount
done
[{"type":"read","mbean":"java.lang:type=Threading","attribute":"ThreadCount"},{"type":"read","mbean":"java.lang:type=Memory","attribute":"HeapMemoryUsage","path":"used"},{"type":"read","mbean":"java.lang:type=Memory","attribute":"HeapMemoryUsage","path":"max"}]W1221 16:01:42.848248       1 metrics_collector_manager.go:106] Failed to collect metrics from [https://10.1.6.5:8778/jolokia]. err=Failed to collect metrics from Jolokia endpoint [https://10.1.6.5:8778/jolokia]. err=Jolokia request failed. 404/404 Not FoundI1221 16:01:52.748201       1 jolokia_metrics_collector.go:82] DEBUG: Told to collect [3] Jolokia metrics from [https://10.1.6.5:8778/jolokia]I1221 16:01:52.748858       1 jolokia_metrics_collector.go:99] TRACE: Making bulk Jolokia request from [https://10.1.6.5:8778/jolokia]:[{"type":"read","mbean":"java.lang:type=Threading","attribute":"ThreadCount"},{"type":"read","mbean":"java.lang:type=Memory","attribute":"HeapMemoryUsage","path":"used"},{"type":"read","mbean":"java.lang:type=Memory","attribute"
@akram
akram / toorop-pure panic.trace
Created October 6, 2016 09:11
toorop-pure panic
2016/10/06 11:09:02 http: panic serving 127.0.0.1:46642: runtime error: cgo argument has Go pointer to Go pointer
goroutine 243 [running]:
net/http.(*conn).serve.func1(0xc820222580)
/usr/lib/golang/src/net/http/server.go:1389 +0xc1
panic(0x7985c0, 0xc820120860)
/usr/lib/golang/src/runtime/panic.go:443 +0x4e9
github.com/toorop/yara._cgoCheckPointer0(0x7041c0, 0xc820120850, 0x0, 0x0, 0x0, 0x6e4d40)
??:0 +0x4d
github.com/toorop/yara.(*Rules).ScanMemory(0xc820022068, 0xc820120840, 0xd, 0x10, 0xc820120850, 0x0, 0x0)
/home/pure/go/src/github.com/toorop/yara/yara.go:158 +0xd7
FROM ubuntu:trusty
RUN mkdir -p /opt/data/mouahahha
RUN mkdir -p /opt/data/main
RUN apt-get -y install curl git
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - && apt-get install -y nodejs python g++ build-essential && npm install -g npm
RUN git clone https://github.com/strongloop/express-example-app
RUN cd express-example-app
RUN npm install
EXPOSE 3000
WORKDIR /opt/data/express-example-app