Skip to content

Instantly share code, notes, and snippets.

View ripper2hl's full-sized avatar
🎯
Focusing

Israel Perales ripper2hl

🎯
Focusing
View GitHub Profile
@ripper2hl
ripper2hl / restart_pods.md
Created December 28, 2022 07:38 — forked from schneefisch/restart_pods.md
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

@ripper2hl
ripper2hl / audio-transcriptions-aws.java
Created December 12, 2020 02:58 — forked from balvinder294/audio-transcriptions-aws.java
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;
public BufferedImage createImageFromSVG(String svg) {
Reader reader = new BufferedReader(new StringReader(svg));
TranscoderInput svgImage = new TranscoderInput(reader);
BufferedImageTranscoder transcoder = new BufferedImageTranscoder();
transcoder.addTranscodingHint(PNGTranscoder.KEY_WIDTH, (float) component.getWidth());
transcoder.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, (float) component.getHeight());
try {
transcoder.transcode(svgImage, null);
} catch (TranscoderException e) {