Skip to content

Instantly share code, notes, and snippets.

View kelsS's full-sized avatar
🍵

Kelsey S. kelsS

🍵
View GitHub Profile
@pjobson
pjobson / setup_cypress_wsl2.md
Last active November 14, 2024 08:29
Setting Up Cypress on Ubuntu WSL2
@gwillem
gwillem / _cronrat.sh
Last active August 27, 2024 18:17
This is the decoded payload from the CRON loader. Full analysis here: https://sansec.io/research/cronrat
set -eEu
set -o pipefail
trap 'echo "L$LINENO"; O70; exit -1' ERR
O54=4
function O70()
{
if [[ ! -z "${O57+x}" ]]; then
if [[ -f "${O57}" ]]; then
rm -f "${O57}"
fi
@acidtone
acidtone / README.md
Last active September 26, 2024 19:05
<aside> element: What's it for?

Aside: Proper Use

In HTML5, aside is only "related to the content around the aside element".

In HTML 5.1 (CR) the definition became more specific: aside is "related to the content of the parenting sectioning content".

Following the newer definition, the aside element should be inside of the section element to which it is related.

Sectioning elements

  • body
  • header
@douknow
douknow / settings.json
Last active April 10, 2024 09:16
Custom VSCode use 'Operator Mono' font for italic font style and 'Fira Code' for other font styles.(I used theme is Palenight Operator)
{
"window.zoomLevel": 0,
"editor.fontSize": 15,
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.lineHeight": 36,
"workbench.colorTheme": "Palenight Operator",
"dart.debugExternalLibraries": false,
"dart.debugSdkLibraries": false,
@Albert221
Albert221 / JetBrains-Mono.css
Last active November 8, 2024 18:58
CSS for using JetBrains Mono on the Web. Simply copy&paste it to your stylesheet.
@font-face {
font-family: 'JetBrains Mono';
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff');
font-weight: 700;
font-style: italic;
font-display: swap;
}
@font-face {
@Treeki
Treeki / TurnipPrices.cpp
Last active November 1, 2024 14:15
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@callumlocke
callumlocke / .zshrc
Last active October 18, 2024 14:13
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@sunnywiz
sunnywiz / sortWL.js
Created October 10, 2019 00:27
SortYoutubeWatchLaterList
// This worked on 2019-10-09 under Chrome in full screen mode.
// Did not work under mobile, they changed ... things?
// You put this in Chrome's Snippets (copy/paste) and then run it from there when you are at the watch later list
// (https://www.youtube.com/playlist?list=WL)
// It will move one video per invocation. I tried to make it do all of them but $$ disappeared.
// Heavily borrowed from many places
// function for triggering mouse events
@mdennis-vpm
mdennis-vpm / gist:22dd508b78ce457220624b7797b58c06
Last active March 8, 2019 18:42
High-Level Bootstrap 4 Container Overview
Bootstrap 4 Default breakpoints (and corresponding fixed-width container sizes):
* xs = 575px and below (100% container, with 15px default left and right paddings)
* sm = 576px – 767px (540px container, with default paddings)
* md = 768px – 991px (720px container, with default paddings)
* lg = 992px – 1199px (960px container, with default paddings)
* xl = 1200px and up (1140px container, with default paddings)
“Container” dimensions are for when non-fluid containers are used.
I personally prefer working with non-fluid containers,
as it leads to massively reduced probability of layout issues.

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.