Skip to content

Instantly share code, notes, and snippets.

View siggiarni's full-sized avatar

Sigurður Árni Svanbergsson siggiarni

View GitHub Profile
@EllyLoel
EllyLoel / reset.css
Last active April 13, 2024 18:14
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@Asjas
Asjas / reset.css
Created May 19, 2021 07:09
Modern CSS Reset - Andy Bell
// https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */

Ten seconds to ponder if a thread is worth it

recording

A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.

.subtext {
  display: inline-block;
 background: linear-gradient(to left, transparent 50%, #f60 50%) right;
@5t3ph
5t3ph / element-classes-and-ids-vanilla.css
Last active January 25, 2022 04:06
Tag HTML elements with their class names and IDs to visualize page structure
*[class],
*[id] {
position: relative;
outline: 2px dashed red;
}
*[class]::before, *[class]::after,
*[id]::before,
*[id]::after {
position: absolute;
@argyleink
argyleink / is.css
Last active December 9, 2022 20:15
light intro to the :is() selector syntax and value
/* before :is() */
button.focus,
button:focus {
...
}
/* after :is() */
button:is(.focus, :focus) {
...
}
@Andy-set-studio
Andy-set-studio / index.html
Created November 1, 2019 14:28
Button with visually hidden text
<button>
<span class="visually-hidden">Some text to announce</span>
<!-- your icon or whatever -->
</button>
@j0hnm4r5
j0hnm4r5 / HomebridgePS4.md
Last active April 25, 2022 23:49
Start your PS4 from Apple Home

PS4 On Homebridge

These are instructions to create a series of buttons within the Apple Home app that control PS4 power and open/close any app you want.

  1. Install Node.js

    Begin by installing Node.js if you haven't already. Their website has up-to-date versions and installation instructions for your OS.

    For macOS I use Homebrew to install packages. If you're a developer (or an aspiring one), I highly recommend using it. Via homebrew, installing node is as simple as brew install node.

@SitePointEditors
SitePointEditors / dom-helper.js
Created March 28, 2017 09:56 — forked from m3g4p0p/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@digiltd
digiltd / finder-window-count.applescript
Last active November 3, 2022 13:23
Count the amount of finder windows
property finderwindownumber : 1
tell application "Finder"
set TotalNumberOfFinderWindows to (count of (every window where visible is true))
if TotalNumberOfFinderWindows is greater than 0 then
tell application "Finder"
select window finderwindownumber
activate
set finderwindownumber to finderwindownumber + 1
if finderwindownumber is greater than TotalNumberOfFinderWindows then
set finderwindownumber to 1