Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 05:07
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

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

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@aduzsardi
aduzsardi / dhcp_119_dns.ps1
Created July 25, 2017 07:51
generate dhcp option 119 (DNS Search Suffix) powershell script
# ----------------------------------------------------------------------------------------------------------
# PURPOSE: Creates a byte array for use with DHCP Option 119
#
# VERSION DATE USER DETAILS
# 1 07/03/2016 Craig Tolley First version
# 1.1 08/03/2016 Craig Tolley Fixed issue where if the whole domain matched the pointer was incorrect
# 1.2 08/03/2017 Craig Tolley Fixed further issues where the whole domain was matched the pointers are incorrect
# Modified outputs and tidied some formatting
# Convert-StringToOpt119Hex option fixed to not return values for null/empty strings
#
@nstarke
nstarke / find-entropy.py
Created August 25, 2019 17:42
Find Entropy of Strings
#!/usr/bin/env python
#
# find-entropy.py
#
# A simple Utility to measure entropy of strings.
# Usage should be something like this:
#
# $ strings file.txt | python find-entropy.py
#
@bmaupin
bmaupin / free-database-hosting.md
Last active April 28, 2024 05:01
Free database hosting
@orestesgaolin
orestesgaolin / http_upload_with_progress.dart
Last active April 28, 2024 05:00
How to upload file to S3 with http library and progress updates (Flutter/Dart)
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:meta/meta.dart';
import 'package:mime/mime.dart';
import 'package:path/path.dart';
import 'package:http/http.dart' as http;
abstract class ApiClient {
@keharriso
keharriso / FindZIP.cmake
Created November 19, 2016 21:57
CMake module for packing and unpacking ZIP files
# FindZIP.cmake - Pack and unpack ZIP files as custom targets
# ------------------------------------------------------------------------------
# Provides:
#
# ZIP_PACK_TARGET TARGET WORKING_DIRECTORY ARCHIVE FILES...
# TARGET - The name of the custom target
# WORKING_DIRECTORY - The working directory for the zip command
# ARCHIVE - The full archive path
# FILES... - The files and directories to include in the archive
# (relative to WORKING_DIRECTORY)
@bitolodeonai7
bitolodeonai7 / glassmorphic-modern-landing-page-with-squircle-buttons-responsive.markdown
Created April 28, 2024 04:53
Glassmorphic Modern Landing page with Squircle Buttons (Responsive)
@sergiecode
sergiecode / curso-java.md
Last active April 28, 2024 04:51
Instalaciones Necesarias y recomendadas para el curso de JAVA
@dakom
dakom / ECS notes.md
Last active April 28, 2024 04:50
ECS with sparse array notes (EnTT style)

Intro

The below is a breakdown / bird's eye view of how a sparse-array backed ECS like EnTT or Shipyard works.

Please see the thanks and references at the bottom - without their help I would not have been able to share this breakdown with you... everything here is really just notes and rephrasing of what they've written already :)

Also, these notes do not cover archetype systems (like unity) nor adaptations of archetypes (like in Flecs). Though there's a couple comparative footnotes at the end.

Here we go!

function myAsyncFunction() {
return new Promise((resolve, reject) => {
setTimeout(() => {
const randomNumber = Math.random();
if (randomNumber > 0.5) {
resolve(randomNumber); // Resolve the promise with a value
} else {
reject(new Error("Random number is less than 0.5")); // Reject the promise with an error
}
}, 1000);