Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@timheuer
timheuer / devcontainer.json
Last active April 23, 2024 15:50
.NET 8 SDK devcontainer w/aspire
{
"name": ".NET with Aspire",
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
@ScottMaclure
ScottMaclure / slack_draft_deleter.js
Last active April 23, 2024 15:49
Slack Draft Deleter
// Remove all drafts from your drafts view
// Navigate to drafts
// F12 to raise dev console
// Paste the below
(async function(x) {
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) {
e.click();
await new Promise(resolve => setTimeout(resolve, 500))
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click();
await new Promise(resolve => setTimeout(resolve, 1500))
@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active April 23, 2024 15:47
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@paulirish
paulirish / what-forces-layout.md
Last active April 23, 2024 15:47
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@tuzz
tuzz / github.css
Last active April 23, 2024 15:47
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ravanscafi
ravanscafi / css-color-for-string.php
Last active April 23, 2024 15:47
Random Color from Input's MD5 Hash
<?php
/**
* Generate a consistent* random color for a text input.
* Consistent because it's based on MD5 hash for the input.
* Since both MD5 and CSS colors uses hexa, a substring of the MD5 can be used.
* Clever, huh?
*
* PS: you can get any substring of length 3 (for less colors) or 6 (for more colors) from your hash. Just don't
* randomize it, or you will loose consistency.
@Jonarod
Jonarod / RadioBox.vue
Created November 23, 2019 18:23
Simple custom Radio component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <RadioBox label="Foo" value="foo" v-model="MySelectedValue" />
* <RadioBox label="Bar" value="bar" v-model="MySelectedValue" />
* <RadioBox label="Baz" value="baz" v-model="MySelectedValue" />
*
* data(){
* return {
* MySelectedValue: "",
@christopher4lis
christopher4lis / util-elastic-collision.js
Last active April 23, 2024 15:40
A set of utility functions used to reproduce the effect of elastic collision within HTML5 canvas. Used in the Chris Courses tutorial video on collision detection: https://www.youtube.com/watch?v=789weryntzM
/**
* Rotates coordinate system for velocities
*
* Takes velocities and alters them as if the coordinate system they're on was rotated
*
* @param Object | velocity | The velocity of an individual particle
* @param Float | angle | The angle of collision between two objects in radians
* @return Object | The altered x and y velocities after the coordinate system has been rotated
*/
@xpando
xpando / ArchLinuxNotes.md
Last active April 23, 2024 15:39
My notes on installing and configuring Arch Linux.
@lopspower
lopspower / README.md
Last active April 23, 2024 15:38
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store