Skip to content

Instantly share code, notes, and snippets.

@neuroradiology
neuroradiology / hide-sponsored-submissions.js
Created September 22, 2023 11:21
Bookmarklet to hide sponsored reddit items in the list
javascript:'use strict';void function(){var b=(document.getElementsByTagName("head")[0]||document.body).appendChild(document.createElement("style"));b.dataset.ahBookmarkletInserted="1";var c=document.createTextNode(".link.promotedlink.promoted, .link.promotedlink.external {display: none;}");b.appendChild(c)}();

Awesome playgrounds

A list of cool interactive online playgrounds on the internet:

  • CSS/HTML/JS: CodePen by Chris Coyier, Alex Vasquez, and team
  • CSS/HTML/JS: JSFiddle by Oskar Krawczyk and Piotr Zalewa
  • CSS/HTML/JS: flems by Rasmus Porsager (saves all state in the URL)
  • DNS: Mess With DNS by Julia Evans and Marie Flanagan
  • DNS: DNS lookup tool by Julia Evans

Source and credits

Everything below the separator bar is a mirror of the "Find Alternatives for Ourselves Megathread: Third Strike" post by bettervanilla on the r/RedditAlternatives subreddit, found here.

It was last updated on 2023, June 27 at or around 1920 EDT. It may or may not get updates going forward, depending on how much free time I have (e.g. don't expect me to update it but I might if I have time). Also, if bettervanilla decides to move his post off of reddit, I plan to update this page to redirect to the new location.

Also found one more really nice list mentioned on the r/linuxmasterrace sub while trying to find where they are migrating to. Thanks to /u/ball_soup for sharing!

https://github.com/maltfield/awesome-lemmy-instances

@neuroradiology
neuroradiology / arena-macos-fixes.sh
Created April 9, 2022 16:08 — forked from april/arena-macos-full-screen-fixes.sh
Fixes Magic Arena's broken full screen implementation on macOS
# this forces Arena into full screen mode on startup, set back to 3 to reset
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these
# and you will need to run these commands again
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# you can also replace the long complicated integer bit with any other scaled 16:9
# resolution your system supports.
# to find the scaled resolutions, go to System Preferences --> Display and then
# divide the width by 16 and multiple by 9. on my personal system this ends up
@neuroradiology
neuroradiology / install-opencl-amd.sh
Created February 10, 2021 13:14 — forked from kytulendu/install-opencl-amd.sh
A shell script to install AMDGPU-PRO OpenCL driver.
#!/bin/bash
# This script will install AMDGPU-PRO OpenCL and Vulkan support.
#
# For Ubuntu and it's flavor, just install the package using this command
# in extracted driver directory instread.
#
# ./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms
#
# For Arch Linux or Manjaro, use the opencl-amd on AUR instread.
@neuroradiology
neuroradiology / script-template.sh
Created December 15, 2020 12:45 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


#!/bin/sh
TMPDIR=`mktemp -d /dev/shm/chrome-XXXXX`
chromium-browser --user-data-dir=$TMPDIR --no-first-run --no-make-default-browser "$@"
rm -rf $TMPDIR
@neuroradiology
neuroradiology / turbo_colormap.glsl
Created August 22, 2019 10:22 — forked from mikhailov-work/turbo_colormap.glsl
Turbo Colormap Polynomial Approximation in GLSL
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// Polynomial approximation in GLSL for the Turbo colormap
// Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f
// Authors:
// Colormap Design: Anton Mikhailov ([email protected])
// GLSL Approximation: Ruofei Du ([email protected])
@neuroradiology
neuroradiology / atom-friendly-phils-zsh-prompt.zsh
Created May 2, 2019 12:05 — forked from bender-the-greatest/atom-friendly-phils-zsh-prompt.zsh
Phil!'s ZSH Prompt - Atom-Friendly. Original version breaks when Atom is installed due to dependency on Atom Package Manager, which overrides the `apm` command.
function precmd {
local TERMWIDTH
(( TERMWIDTH = ${COLUMNS} - 1 ))
###
# Truncate the path if it's too long.
PR_FILLBAR=""