Skip to content

Instantly share code, notes, and snippets.

View AlexRogalskiy's full-sized avatar
🛰️
Work on stuff that matters

Alexander AlexRogalskiy

🛰️
Work on stuff that matters
View GitHub Profile
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@AlexRogalskiy
AlexRogalskiy / InnerClassLambdaMetafactory.java.patch
Created August 3, 2023 09:05 — forked from amaembo/InnerClassLambdaMetafactory.java.patch
Patch for InnerClassLambdaMetafactory to generate line number debug info
diff --git a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java (revision 57611b30219191160f7faccb811b41a31c25c0b8)
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java (date 1626887157914)
@@ -315,6 +315,18 @@
return generateInnerClass();
}
+ private static StackTraceElement getCallerFrame() {
+ StackTraceElement[] trace = new Exception().getStackTrace();
+ for (int i = 0; i < trace.length - 1; i++) {
@AlexRogalskiy
AlexRogalskiy / java_download.sh
Created July 19, 2023 08:18 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@AlexRogalskiy
AlexRogalskiy / sql_resources.md
Created May 25, 2023 06:49 — forked from momer/sql_resources.md
SQL learning Resources for Beginners

There are a number of good introductory SQL resources available for free and online. There are also some paid resources which I recommend for beginners, that are very effective, and well worth expensing in my opinion.

A couple of notes:

  • I haven’t used all of these resources, but they come with strong recommendations around the web or myself/my peers.
  • You absolutely don’t need to use every single resource. Find a couple that work for you, and go to town.
  • You can always reach out to me if you have questions. I always paste this online when people are new to asking very technical questions – it’s not meant to be snarky – it's a gentle guide on how to compose your questions and gather necessary resources in order to best give technical people the information needed to get a quick/effective response: http://www.mikeash.com/getting_answers.html

Video/Class/Mini-course based:

  1. Stanford Self-paced ‘Database’ course
  • The original Coursera
@AlexRogalskiy
AlexRogalskiy / latency.markdown
Created May 14, 2023 06:51 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@AlexRogalskiy
AlexRogalskiy / Demo.java
Created April 19, 2023 10:36 — forked from anjia0532/Demo.java
@HystrixCommand support dynamic command key
@Component
public class Demo {
@HystrixCommand(commandKey = "#key",groupKey = "#key",fallbackMethod = "fail")
public String exec(String key){
if (RandomUtils.nextBoolean()) {
System.out.println(1 / 0);
}
return key;
}
public String fail(String key){
{
"type" : "record",
"name" : "TimeExamples",
"namespace": "com.example",
"fields" : [
{
"name": "aDate",
"type": "int"
"logicalType": "date"
},
@AlexRogalskiy
AlexRogalskiy / supress-warning-idea.md
Created March 27, 2023 11:18 — forked from vegaasen/supress-warning-idea.md
SuppressWarnings with IntelliJ Idea

@SuppressWarnings - IntelliJ modes

Information

This list may grow each year with either new versions or patches. Enjoy!

Usage

Following is an example related to the usage of the various ignore capabilities.

@AlexRogalskiy
AlexRogalskiy / bitbucket-pipeline-pull-files.md
Created February 10, 2023 22:35 — forked from shankar-bavan/bitbucket-pipeline-pull-files.md
CI CD with bitbucket pipleline and shell script