Skip to content

Instantly share code, notes, and snippets.

@mafintosh
mafintosh / promise-unhandled-why.js
Last active March 30, 2022 06:30
promise-unhandled-why.js
start()
async function start () {
const promises = [
new Promise((resolve, reject) => setTimeout(reject, 1000)),
Promise.reject(),
Promise.reject()
]
for (const a of promises) {
@Ginsor
Ginsor / gist:019a0cbd32bb5868d1e08f7dc927b06e
Created May 11, 2021 17:28
Destiny 2 - Season of the Splicer- 3.2.0 - All new Text Strings
Destiny 2 - Season of the Splicer - 3.2.0
All new Text Strings
-- BY GINSOR --
[00C0DE80][B263395F]You’re just in time! I’m planning a little party of sorts in the EDZ for our Fallen, Cabal, and Taken...friends. All Guardians are invited.
[00C0DE80][00F7A875]A party favor for you. May it serve you well out in the wilds.
[00C0DE80][CFF6DBD2]Together, we have done the impossible. We’ve secured the EDZ. A temporary victory, to be sure, but I will celebrate regardless.
[00C0DE80][EA6AEDE2]I’ll bring the tea. You bring the bullets.
[01C0DE80][F969A214]A party favor for you. May it serve you well out in the wilds.
[01C0DE80][47448E3B]You’re just in time! I’m planning a little party of sorts in the EDZ for our Fallen, Cabal, and Taken...friends. All Guardians are invited.
@matusnovak
matusnovak / README.md
Last active March 31, 2024 21:27
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed

@Jesse-Culver
Jesse-Culver / optimizationInSourceEngine.md
Last active May 5, 2022 23:01
This is a basic run down of mapping optimization in the Source 1 Engine.

Optimization in the Source Engine is a critical component of mapping that not only makes your map compile faster but run better in game. However the two results are not always related.

"Why does it take so long for my map to compile?" The short answer is Source uses an optimization method called Binary Space Partitioning. The way this works is by cutting your map up into sections called leaves based on your brushes and then calculating what is in each leaf and then what leaves each leaf can see.

If you want a really good easy to follow explanation watch this video and this video


For optimizing in Source follow these in order and by the end you should have a fairly good understanding of how to optimize your map for performance and compile time. This is something you are going to have to practice

@taliesinb
taliesinb / math-unicode-symbols.txt
Last active July 24, 2023 11:40
List of useful mathematical unicode symbols
ALMOST EQUAL TO ≈
ANGLE ∠
ASTERISK OPERATOR ∗
ASYMPTOTICALLY EQUAL TO ≃
BALLOT X ✗
BLACK RIGHTWARDS ARROWHEAD ➤
BLACK SQUARE ■
BOTTOM SQUARE BRACKET ⎵
CHECK MARK ✓
CIRCLED PLUS ⊕
@tiehichi
tiehichi / sc_ble_protocol.md
Last active August 28, 2023 07:49
Steam Controller BLE Protocol #steamcontroller

Steam Controller BLE HID Protocol

After connecting the SteamController through BLE, you can see that there are 5 characteristics in the HID Service: three Input Reports, one Output Report, one Feature Report, and Report Map

In lizard mode, the three Input Reports correspond to the following events:

Input Report event
Input Report 0 Keyboard Input
Input Report 1 Mouse Input
@Potherca
Potherca / README.md
Last active February 28, 2024 19:17
What is the use of the hackers.txt file? (Or a history of security.txt)

(This article was originally posted as an answer to a question on stackoverflow)

Commonly known as Eduardo Vela, [Eduardo A. Vela Nava][1] (or sirdarckcat on [Github][2] and [Twitter][3]) has been a Security Engineer at Google since 2010. (He currently has the role of Product Security Response Team Lead).

As other security experts before him, he pondered the issue of effectively communicating the details of a site's vulnerability reward program to [white hat hackers][4]/[pen-testers][5].

One specific such person is [Chema Alonso][6] (also on [Twitter][7]).

He is well-known enough to warrant [a Spanish Wikipedia entry][8]

@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active May 4, 2024 03:16
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@dvlop
dvlop / gist:fca36213ad6237891609e1e038a3bbc1
Last active May 3, 2024 16:43 — forked from allthingsdem/gist:63b3223a7d14ac1f2457
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active May 3, 2024 15:54
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \