Skip to content

Instantly share code, notes, and snippets.

@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);
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active April 28, 2024 04:37
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@teybannerman
teybannerman / UX-&-UI-Design-Resources.md
Last active April 28, 2024 04:33
UX & UI Design Resources

UX & UI Design Resources on the Web

Index

  1. Online Prototyping
  2. User Testing & Feedback
  3. UI Design Patterns
  4. Colours & Gradients
  5. User & Profile Photos
  6. Stock Photography
  7. Icons
@khskekec
khskekec / libre-link-up-http-dump.md
Last active April 28, 2024 04:30
HTTP dump of Libre Link Up used in combination with FreeStyle Libre 3
@multidis
multidis / list_as_fun_args.r
Created December 16, 2013 22:21
Passing lists as function arguments in R. Frequently helps reduce code repetition (e.g. if/else calls of different functions with mostly the same arguments). NOTE: always consider a closure function as FP alternative to this method of dealing with repetitive code elements.
## regular case
foo <- function(a, b, c) a + b - c ## does something
foo2 <- function(b, c) b + c ## also some function
foo(a=1, b=2, c=5)
foo2(b=2, c=5) ## repeating list of multiple arguments
## passing a list
arg.list <- list(b=2, c=5)
do.call(foo, c(list(a=1), arg.list))
do.call(foo2, arg.list)
@sundowndev
sundowndev / GoogleDorking.md
Last active April 28, 2024 04:14
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 28, 2024 04:04
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@balazsbotond
balazsbotond / notify.ps1
Last active April 28, 2024 04:01
PowerShell script for sending Windows 10 notifications
$ErrorActionPreference = "Stop"
$notificationTitle = "Build Succeeded"
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($toastXml.OuterXml)
$toast = [Windows.UI.Notifications.ToastNotification]::new($xml)
$toast.Tag = "Test1"