Skip to content

Instantly share code, notes, and snippets.

@benigumocom
benigumocom / build.gradle.kts
Last active May 17, 2024 12:14
Dagget-Hilt + KSP
// Project
plugins {
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
}
// Module
plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
@vlucas
vlucas / encryption.js
Last active May 17, 2024 12:11
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@tsvikas
tsvikas / joblib_parallel_with_tqdm.py
Last active May 17, 2024 12:11
joblib.Parallel, but with a tqdm progressbar
import tqdm
from joblib import Parallel
class ParallelTqdm(Parallel):
"""joblib.Parallel, but with a tqdm progressbar
Additional parameters:
----------------------
total_tasks: int, default: None
@JunkFood02
JunkFood02 / Motion.kt
Last active May 17, 2024 12:10
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing
@yanniboi
yanniboi / README.md
Created May 18, 2021 09:38
Reverse a keyframe animation in Unity

Original solution can be found here: http://answers.unity.com/answers/477764/view.html

This is an editor script to reverse an AnimationClip. Since it's an editor script you have to put it in a folder called "Editor". Once it's there a new mainmenu item called "Tools" will appear (if not just click the "File" menu once).

How to use:

Now you have to duplicate the AnimationClip in Unity by pressing CTRL+D while you have selected the AnimationClip. Select the duplicated Clip and click on Tools/ReverseAnimation. This will reverse the animation.

@mndambuki
mndambuki / officeActivator.bat
Created June 7, 2020 03:41
Activate Microsoft Office 2019
@echo off
title Activate Microsoft Office 2019 !
cls
echo ============================================================================
echo #Project: Activating Microsoft software products
echo ============================================================================
echo.
echo #Supported products:
echo - Microsoft Office Standard 2019
echo - Microsoft Office Professional Plus 2019
@itsmikita
itsmikita / README.md
Last active May 17, 2024 12:07
Create bootable USB drive from InstallMacOSX.pkg

Create bootable USB drive from InstallMacOSX.pkg

  1. Erase USB drive with Disk Utility using format Mac OS Extended (Journaled) and Master Boot Record and call it MyVolume
  2. Use Finder to mount/open InstallMacOSX.dmg.
  3. Run following commands:
pkgutil --expand /Volumes/Install\ OS\ X/InstallMacOSX.pkg /tmp/El\ Capitan
diskutil eject Install\ OS\ X
cd /tmp/El\ Capitan