Skip to content

Instantly share code, notes, and snippets.

@MattAlp
MattAlp / ClassInit.java
Created February 11, 2025 21:29 — forked from simonis/ClassInit.java
Concurrent class initialization
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
public class ClassInit {
static final int CLASSLOADERS = Integer.getInteger("classloaders", 3);
static final int THREADS = Integer.getInteger("threads", 3);
static class MyClassLoader extends URLClassLoader {
public MyClassLoader() {
@Noeda
Noeda / interview_question_pizza_places_2025_02_11.txt
Last active February 11, 2025 21:33
interview_question_pizza_places_2025_02_11.txt
11 Feb 2025 - Mikko Juola
This is an interview question I once designed at a company,
when directed to design a coding question for a question bank.
I can't remember the exact details how I formulated it when I
designed it the first time, likely around 2017, but this is the best
as I can remember it.
I really don't like this question myself despite having designed it.
@ameyer117
ameyer117 / EmbeddedResource.cs
Created February 11, 2025 21:29
EmbeddedResource.cs - Semantic Kernel
using System.ComponentModel.DataAnnotations;
namespace M02_Project;
using System;
using System.IO;
using System.Reflection;
internal static class EmbeddedResource
#!/usr/bin/env bash
set -Eeuo pipefail
# -c, --context string context in the kubeconfig file of the PVC
# -k, --kubeconfig string path of the kubeconfig file of the PVC
# -R, --mount-read-only mount the PVC in ReadOnly mode (default false)
# -n, --namespace string namespace of the PVC
# -d, --dir string dir to mount to (defaults to /mnt)
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created February 11, 2025 21:28
Rimworld output log published using HugsLib
Log uploaded on Tuesday, February 11, 2025, 10:28:24 PM
Loaded mods:
Prepatcher(zetrith.prepatcher): 0Harmony(2.3.3), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
[WD] Expanded Floors(Wemd.ExpandedFloors): (no assemblies)
[WD] Realistic Darkness(Wemd.RealisticDarkness): RealisticDarkness(1.0.0)
Better Map Sizes(madarauchiha.custommapsizes): CustomMapSizes(1.0.0)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4)
Character Editor(void.charactereditor): CharacterEditor(1.5.10)
@Schoolads
Schoolads / gist:1ad2230607eb35d11b99a167f0709997
Created February 11, 2025 21:27
College of Nursing Sciences, Hadejia, Jigawa State. 2025/2026 {O8125777035} Admission Form Is STILL ON SALE.. Call DR.MRS ALICE OGUNSOLA on {O8125777035}.The Management of the school hereby inform the general public of the sales of the general Nursing Admission form into the School of Nursing, Also midwifery, post-basic midwifery form, post-basi…
College of Nursing Sciences, Hadejia, Jigawa State. 2025/2026 {O8125777035} Admission Form Is STILL ON SALE.. Call DR.MRS ALICE OGUNSOLA on {O8125777035}.The Management of the school hereby inform the general public of the sales of the general Nursing Admission form into the School of Nursing, Also midwifery, post-basic midwifery form, post-basic nursing form and internship form are still on sale for more information on purchase of the form and admission assistance call Admin Officer{O8125777035}
#include <iostream>
using namespace std;
int main()
{
const int ROWS = 5;
const int COLS = 5;
int arr[ROWS][COLS];
int num;
cout << "enter first number:";
cin >> num;
@stakach
stakach / sock_check.cpp
Created February 11, 2025 21:26
non blocking socket check windows
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <stdio.h>
// Helper function to print Winsock error messages.
void print_wsa_error(const char *msg) {
int errCode = WSAGetLastError();
LPVOID errorText = NULL;
@kissu
kissu / button.css
Created February 11, 2025 21:26
And example of a possible Dribble bucket integration
.btn-green {
text-decoration: none;
background-color: #3DBF59;
padding: 8px;
margin-top: 8px;
color: white;
width: 100%;
display: inline-block;
text-align: center;
}
@Abdulrahman-K-S
Abdulrahman-K-S / py
Created February 11, 2025 21:26
Hennag Python Sum of Positive Squared Numbers
def print_outputs(sum):
number = get_number(sum, '')
if number == None:
return
print(number)
print_outputs(sum)
def get_number(string, number=''):
try: