Skip to content

Instantly share code, notes, and snippets.

View OpenSrcerer's full-sized avatar
😘
no ticket = no work

Daniel Stefani OpenSrcerer

😘
no ticket = no work
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active July 16, 2024 00:24
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

This no longer works if you're alone in vc! Somebody else has to join you!

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!

@ziomarco
ziomarco / <entity>.module.ts
Last active September 1, 2023 08:13
Easy NestJS Mongoose Testing
/*
Merging all the times <entity>.module.ts and fake module instantation is boring for all, so let's help us using this structure.
*/
export const moduleConf = {
imports: [
TracksModule,
MongooseModule.forFeature([{ name: Entity.name, schema: EntitySchema }]),
MongooseModule.forFeature([
{ name: SecondEntity.name, schema: SecondEntitySchema },
@ziomarco
ziomarco / safeIterate.ts
Last active April 29, 2023 13:22
Need to iterate on functions when potentially multiple valid arguments without risking a RangeError exception?
/**
Do you need to handle a potential RangeError (Max call stack size exceeded) because of a recursive function?
Maybe the input should change in several ranges basing on random criterias?
Please don't try/catch things lot of times, use this :)
Example Usage:
[ this is my recursive function ] [these are my fn args], [this are values that will be tried instead of 'ITERATE' arg ]
const simplifiedTrack: FeatureCollection = handleSyncRecursion(simplifyGeoJsonWithMaxPointsLimit, [track, 50, 'ITERATE'], [0.001, 0.005, 0.008, 0.01]);
*/
@Nemika-Haj
Nemika-Haj / README.md
Last active February 8, 2024 22:56
How to make the BytesToBits welcome GIF

Since a LOT of people like the way it looks, and wanted to know how to make it, here is the code :3

Preview

Preview

@sumanmaity112
sumanmaity112 / automated-slim-jre.Dockerfile
Last active October 6, 2023 08:02
Automatically update the required java modules as per application requirements and create custom slim JRE to execute the same
FROM amazoncorretto:17-alpine as corretto-deps
COPY ./greetings/build/libs/greetings.jar /app/
RUN unzip /app/greetings.jar -d temp && \
jdeps \
--print-module-deps \
--ignore-missing-deps \
--recursive \
--multi-release 17 \
@ziomarco
ziomarco / sideEffects.ts
Created November 29, 2021 14:02
NestJS util in order to obtain "side-effects"
/**
* Little helper for creating "side effects" with TypeScript
* @param effect {Promise<T> | Function} Function or promise to call independently
* @param caller {string} Name of side effect, useful for logging
*/
export function sideEffect(effect: Promise<any> | Function, caller: string): void {
if (effect instanceof Promise) {
effect
.then(() => console.log(`Side effect "${caller}" completed without errors.`))
@wispborne
wispborne / KotlinComparisonClass.java
Last active August 17, 2020 19:42
Comparison of Java to Kotlin for various simple methods.
/** Example of a {@link Class} declaration */
public final class MyClass {
private boolean someBool;
public MyClass() {
}
public MyClass(boolean someBool) {
this.someBool = someBool;
}