Skip to content

Instantly share code, notes, and snippets.

View ripper2hl's full-sized avatar
🎯
Focusing

Israel Perales ripper2hl

🎯
Focusing
View GitHub Profile
@hguerrero
hguerrero / microcks-pvc.yaml
Created May 31, 2024 13:43
Microcks Deployments K8s
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: microcks-pvc
labels:
app: microcks
spec:
resources:
requests:
@kaaquist
kaaquist / podman_macos.md
Last active July 29, 2024 09:13
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@schneefisch
schneefisch / restart_pods.md
Last active July 9, 2024 15:46
How to restart all pods in a statefulset or deployment

Various ways to restart pods

Restart deployment

The most gracefull way is to trigger a restart for the deployment. In this case, a pod will only be terminated once the new pod is ready. It will slowly replace all pods one after the other.

kubectl rollout restart deployment <deployment-name>

Restart pods in a statefulset

@balvinder294
balvinder294 / audio-transcriptions-aws.java
Last active December 12, 2020 02:58
Audio File Transcription for Transcribe API Aws == Tekraze.com
/********** Step 1 **********************
*********** File Imports ***************/
import com.amazonaws.services.transcribe.AmazonTranscribe;
import com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder;
import com.amazonaws.services.transcribe.model.DeleteTranscriptionJobRequest;
import com.amazonaws.services.transcribe.model.GetTranscriptionJobRequest;
import com.amazonaws.services.transcribe.model.GetTranscriptionJobResult;
import com.amazonaws.services.transcribe.model.LanguageCode;
import com.amazonaws.services.transcribe.model.Media;
import com.amazonaws.services.transcribe.model.StartTranscriptionJobRequest;
@W1R3D-Code
W1R3D-Code / sonarqube.service
Last active October 15, 2024 10:22
Running SonarQube as a Service on Linux with SystemD - /etc/systemd/system/sonarqube.service
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
@svantelidman
svantelidman / java_scheduling_kubernetes.md
Created December 2, 2018 18:13
What do the resource requests and limits mean in OpenShift and how might they effect your Java application?

What do the resource requests and limits mean in OpenShift and how might they effect your Java application?

Java resource management

To the extent it is implementation specific the discussion below is based on the OpenJDK HotSpot runtime.

Threads

The JVM maps threads in Java to OS threads 1:1 , i.e., there are no "green threads" in Java like there are in some other virtual machines, for example BEAM, the Erlang virtual machine.

A thread in the JVM can be in one of the following states:

  • thread_new: a new thread in the process of being initialized
@ricardozanini
ricardozanini / readme.md
Created June 19, 2018 18:51
Scale down all openshift pods in a project

oc scale --replicas=0 $(oc get dc -o name | xargs) -n

@ikurni
ikurni / nodeSelector.config
Last active May 5, 2022 03:57
Schedule a POD to specific node
https://access.redhat.com/solutions/2178611
### How to Force a pod to schedule to a specific node using nodeSelector in OCP
Pods get scheduled to nodes based on the node labels. NodeSelector will get set either for the cluster, project, or pod to determine which node or group of nodes the pod will be scheduled to.
The easiest way to test and ensure a pod is scheduled to a node is by setting it at the project level. This can only be done by cluster-admins or users with elevated privileges.
# oc adm project <NAME> --node-selector='foo=bar'
@jeffsheets
jeffsheets / HibernatePersistenceProviderResolver.java
Created May 20, 2016 19:51
Use JPA 2.1 and Hibernate 4.3.11 on Websphere 8.5.5.x
import org.hibernate.jpa.HibernatePersistenceProvider;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
import javax.persistence.spi.PersistenceProvider;
import javax.persistence.spi.PersistenceProviderResolver;
import javax.persistence.spi.PersistenceProviderResolverHolder;
import java.util.Collections;
import java.util.List;
@vancluever
vancluever / gnome-tracker-disable.md
Last active November 13, 2024 18:26
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories