Skip to content

Instantly share code, notes, and snippets.

View coliff's full-sized avatar
coding and coffee

Christian Oliff coliff

coding and coffee
View GitHub Profile
@jonathantneal
jonathantneal / ui-monospace.css
Created July 31, 2022 23:16
CSS ui-monospace polyfill (448 bytes minified, 182 gzipped)
/* These rules are ignored when ui-monospace is supported. */
@font-face { font-family: ui-monospace; src:
/* MacOS (El Capitan +) */
local(Menlo-Regular),
/* Windows (11 +) */
local(CascadiaCode-Regular),
/* Windows (Vista +) */
local(Consolas),
/* Android */
local(RobotoMono-Regular),
// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open('app').then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));
@squidfunk
squidfunk / twitter-detox.css
Last active August 31, 2024 17:36
Don't get sucked into Twitter (recommended extension: User CSS)
/* Hide menu items */
[aria-label^="Home"][role="link"],
[aria-label^="Search"],
[aria-label^="Bookmarks"],
[aria-label^="Grok"],
[aria-label^="Lists"],
[aria-label^="Communities"],
[aria-label^="Twitter Blue"],
[aria-label^="Premium"],
[aria-label^="Verified"],
@Juan-escobar94
Juan-escobar94 / migrate-b4-to-b5.sh
Last active November 8, 2023 19:42
Migrate bootstrap 4 classes to bootstrap 5.
set -x
set -e
# e.g. folder to process e.g. "frontend/"
migration_folder=$1
find_regex=".*/*.tsx?" # mach all .ts and .tsx files
# include trailing path "/" in folder parameter: e.g "frontend/" instead of just "frontend"
ignore_path="*/$1node_modules/*"
# Back up your files or change sed argument -i to -i.bak to generate backup files
find $migration_folder -regextype posix-egrep -regex $find_regex -type f -not -path $ignore_path | xargs sed -i -E '/[(class)(")]/{
s/([mp])l(-[0-5])/\1s\2/g
@sana-ajani
sana-ajani / settings.json
Last active February 12, 2021 08:57
VS Code Demo Settings
{
//----Demos----
"update.mode": "none",
"extensions.autoCheckUpdates": false,
"screencastMode.onlyKeyboardShortcuts": true,
//----Settings----
"workbench.settings.editor": "json",
//----Editing----
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active October 24, 2024 18:10
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@DavidWells
DavidWells / netlify.toml
Last active June 27, 2024 14:43
All Netlify.toml & yml values
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
@coliff
coliff / nextcloud-troubleshooting-ubuntu.md
Last active September 12, 2018 10:27
Trouble Shooting Issues with Nextcloud on Ubuntu

Can't write changes to files in Nextcloud

Give yourself write privileges with: sudo setfacl -R -m "u:ubuntu:rwx" /var/www/nextcloud/

Reboot

sudo reboot

Restart MySQL

@CreativePoweredGeek
CreativePoweredGeek / stylesheet.css
Last active June 17, 2019 08:13
Bootstrap 4 responsive breakpoints css file
// These are the Bootstrap 4 Breakpoints per the Docs
// Google Fonts pre-load
// Extra small devices (portrait phones, less than 576px)
// No media query since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) {