Skip to content

Instantly share code, notes, and snippets.

View ddjerqq's full-sized avatar
🐙
말보다는 행동이지

tenxdeveloper ddjerqq

🐙
말보다는 행동이지
View GitHub Profile
public static class ExpandoExt
{
/// <summary>
/// Add a property to a dynamic object at runtime.
/// </summary>
/// <example>
/// dynamic expando = new ExpandoObject();
/// expando.Name = "Brian";
/// expando.Country = "USA";
/// expando.AddProperty("Language", "English");
@ddjerqq
ddjerqq / Rfc6238.cs
Last active November 13, 2023 17:15
TOTP: Time-Based One-Time Password Algorithm Implementation in C#
using System.Security.Cryptography;
namespace Rfc6238;
public enum HmacAlgo
{
Sha1,
Sha256,
Sha512,
}
@Softwave
Softwave / README.md
Last active March 25, 2025 16:00
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

@ddjerqq
ddjerqq / sha256.cuh
Last active August 9, 2024 19:02
CUDA C++ SHA256
#include <cstring>
#include <sstream>
#include <iomanip>
#ifndef SHA256_CUH
#define SHA256_CUH
#include <string>
#include <array>
@ddjerqq
ddjerqq / julia.cu
Last active March 28, 2023 06:30
julia fractal set using CUDA and complex numbers
// check comments for where to find these headers
#include "../common/book.h"
#include "../common/cpu_bitmap.h"
#define DIM 1000
#define SCALE 0.1f
#define STEPS 300
#define JULIA_REAL (-0.8f)
#define JULIA_IMAG (0.155f)
@ddjerqq
ddjerqq / hello.cu
Created January 8, 2023 15:39
hello CUDA application my first CUDA app
#include <iostream>
using namespace std;
// create a 'kernel'. a kernel is a function that runs on the 'device' - GPU
__global__
void saxpy(int n, float a, float* x, float* y)
{
// get the current index in the arrays;
int i = blockIdx.x * blockDim.x + threadIdx.x;
@ddjerqq
ddjerqq / result_option.py
Created October 22, 2022 23:37
rust option and result but in python
from __future__ import annotations
from typing import Any
from typing import Callable
from typing import Generic
from typing import Tuple
from typing import TypeVar
from typing import Union
from typing import overload
@ddjerqq
ddjerqq / discord_id_generator.rs
Last active November 2, 2023 12:43
snowflake.rs
use std::time::{SystemTime, UNIX_EPOCH};
const EPOCH: u64 = 1420070400000;
pub struct Id {
internal_worker: u128,
internal_process: u128,
increment: u128,
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active June 2, 2025 16:57
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m