Skip to content

Instantly share code, notes, and snippets.

@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);
@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"