Skip to content

Instantly share code, notes, and snippets.

View ananich's full-sized avatar

Anthony Ananich ananich

View GitHub Profile
@ananich
ananich / gist:98310150db97f6edac28
Last active August 29, 2015 14:15
java.lang.Integer.numberOfLeadingZeros (in Assembler x86)
CompilerOracle: print *Integer.numberOfLeadingZeros
Compiled method (c1) 1437 56 3 java.lang.Integer::numberOfLeadingZeros (76 bytes)
total in heap [0x000000010a826bd0,0x000000010a8270f0] = 1312
relocation [0x000000010a826cf8,0x000000010a826d30] = 56
main code [0x000000010a826d40,0x000000010a826f60] = 544
stub code [0x000000010a826f60,0x000000010a826ff0] = 144
metadata [0x000000010a826ff0,0x000000010a826ff8] = 8
scopes data [0x000000010a826ff8,0x000000010a827038] = 64
scopes pcs [0x000000010a827038,0x000000010a8270e8] = 176
dependencies [0x000000010a8270e8,0x000000010a8270f0] = 8
@ananich
ananich / gist:631f9d40d20ec3aa5104
Created February 12, 2015 11:02
java.lang.Integer.numberOfLeadingZeros (Java 8)
/**
* Returns the number of zero bits preceding the highest-order
* ("leftmost") one-bit in the two's complement binary representation
* of the specified {@code int} value. Returns 32 if the
* specified value has no one-bits in its two's complement representation,
* in other words if it is equal to zero.
*
* <p>Note that this method is closely related to the logarithm base 2.
* For all positive {@code int} values x:
* <ul>
@ananich
ananich / workato-agent.yaml
Created February 18, 2022 02:36
Kubernetes deployment descriptor for Workato on-prem agent
apiVersion: apps/v1
kind: Deployment
metadata:
name: workato-agent
spec:
replicas: 1
selector:
matchLabels:
app: workato-agent
template:
@ananich
ananich / Dockerfile
Created February 18, 2022 02:51
Workato on-prem agent Docker file
FROM openjdk:11-jre-slim
LABEL maintainer="<your email goes here>"
RUN apt-get update -y \
&& apt-get upgrade -y
# Set Workato OPA agent dir
ARG WORKATO_OPA_DIR="/opt/workato-agent"
# Create Workato user and group