Skip to content

Instantly share code, notes, and snippets.

View rmohta's full-sized avatar
🎯
Focusing

Rohit rmohta

🎯
Focusing
View GitHub Profile
@veggiemonk
veggiemonk / CKAD.md
Last active June 6, 2025 10:09
CKAD exam preparation
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 90; // variable to store the servo position
int resetPos= 100;
int maxPos = 150;
int minPos=50;
@xkr47
xkr47 / DynamicCertOptions.java
Last active July 28, 2020 16:25
An attempt to support TLS SNI in vertx with dynamic reconfiguration support
import io.vertx.core.Vertx;
import io.vertx.core.net.KeyCertOptions;
import javax.net.ssl.*;
import java.net.Socket;
import java.security.*;
import java.security.cert.X509Certificate;
public class DynamicCertOptions implements KeyCertOptions {
@so0k
so0k / kubectl.md
Last active February 4, 2025 17:16
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@apangin
apangin / HotSpot JVM intrinsics
Last active February 26, 2025 11:43
HotSpot JVM intrinsics
_hashCode java/lang/Object.hashCode()I
_getClass java/lang/Object.getClass()Ljava/lang/Class;
_clone java/lang/Object.clone()Ljava/lang/Object;
_dabs java/lang/Math.abs(D)D
_dsin java/lang/Math.sin(D)D
_dcos java/lang/Math.cos(D)D
_dtan java/lang/Math.tan(D)D
_datan2 java/lang/Math.atan2(DD)D
_dsqrt java/lang/Math.sqrt(D)D
_dlog java/lang/Math.log(D)D
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active May 21, 2025 16:22
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array