Skip to content

Instantly share code, notes, and snippets.

View AzizStark's full-sized avatar
๐Ÿ”ฎ
Dreaming

Aziz Rahman อ›โ˜‚๏ธŽ AzizStark

๐Ÿ”ฎ
Dreaming
View GitHub Profile
{
"query": {
"query_string": {
"query": "+contentType:BlogPost"
}
},
"aggs": {
"articles": {
"date_histogram": {
"field": "BlogPost.articlePublishDate",
@AzizStark
AzizStark / Flicker Fix in Three.js
Created October 9, 2024 09:07
Eliminate Flicker in ThreeJS
Eliminating texture flicker in Three.js is essential for creating smooth and visually appealing 3D scenes. Texture flickering can occur due to various reasons such as z-fighting, aliasing, incorrect texture filtering, or precision issues. Below are detailed explanations and solutions to address these problems.
---
## **1. Z-Fighting**
### **Cause:**
Z-fighting happens when two or more surfaces occupy the same or very close depth positions. The renderer can't decide which surface to display, leading to flickering artifacts.
import * as cdk from 'aws-cdk-lib'
import { Construct } from 'constructs'
import * as s3 from 'aws-cdk-lib/aws-s3'
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'
import * as iam from 'aws-cdk-lib/aws-iam'
import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment'
export class CdkStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props)
@AzizStark
AzizStark / uuid.vtl
Created July 22, 2024 06:32
Velocity UUID Generation
#macro( generateUUID )
## this is just a mock version of UUID generation, not an actual uuid uuidGenerator
## even though there is a less chance of duplicates, uniqueness is not guranteed
## therefore this should not be used in security related stuff
#set( $UUID = "" )
#set( $randomNumber = $math.random(1, 1000) )
#set( $currentTime = $date.get('yyyyMMddHHmmssSSS') )
#set( $randomSum = $math.add($randomNumber, $currentTime) )
#set( $cryptHash = $crypt.crypt($randomSum.toString()) )
#set( $UUID = $cryptHash.replaceAll("[^a-zA-Z0-9]", "") )
@AzizStark
AzizStark / JDBC-MySQL-CheatSheet
Created June 5, 2024 15:51
JDBC MySQL Cheatsheet
Here is a concise JDBC MySQL connection cheat sheet for quick reference:
### JDBC MySQL Connection Cheat Sheet
#### 1. **Dependencies**
Ensure you have the MySQL JDBC driver. For Maven, add the following dependency to your `pom.xml`:
```xml
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
@AzizStark
AzizStark / LG Ultragear 27GN880 - Mac Calibration
Created April 4, 2023 18:37
Ultragear 27GN880 Color Calibration with MacOS
MacOS Display Settings:
- Display Profile: Color LCD
- Resolution: 2560 x 1440
- Refresh Rate: 120 Hertz
Ultragear Settings:
+ Game Mode
- Gamer 1
+ Game Adjust
- Freesync Premium: Off
@AzizStark
AzizStark / tsconfig.json
Created October 27, 2021 18:43
tsconfig for gatsby with typescript
{
"compilerOptions": {
"target": "es5",
"declaration": true,
"declarationDir": "dist",
"emitDeclarationOnly": true,
"module": "esnext",
"lib": ["es6", "dom", "es2016", "es2017"],
"sourceMap": true,
"jsx": "react-jsx",