Skip to content

Instantly share code, notes, and snippets.

@tfausten
tfausten / slack-disable-blue-dot-4.23.sh
Last active June 5, 2023 13:30
Disable the blue "unread" dot in Slack for Ubuntu, version 4.23.0
#!/usr/bin/env sh
# requirement: sudo npm install -g asar
set -eu
# Clean up previous failed attempts
rm -rf ~/tmp/slack
rm -rf ~/tmp/app.asar
# Unpack

A significant amount of press (a selection that is by no means exhaustive has been linked below) has been given to companies and organizations that are doing 4 day/8 hour work weeks without a change in compensation. Organizations that adopted a 4 day work week experienced

  • Sustained or improved productivity.
  • Worker happiness increased dramatically.
  • Stress, burnout and turnover decreased.
  • Companies had an easier time attracting and retaining talent.
  • Customer outcomes improved.
  • Number of sick days declined.
  • Carbon footprints could be reduced significantly.
@morganmcg1
morganmcg1 / minGPT-Fastai_Play_Char.ipynb
Created August 22, 2020 00:04
Karpathy's minGPT in Fastai
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pixelsnafu
pixelsnafu / CloudsResources.md
Last active March 28, 2024 10:43
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

@pinkhominid
pinkhominid / index.js
Created September 24, 2019 10:15
Upload a file with node-fetch and form-data
const fs = require('fs');
const fetch = require('node-fetch');
const FormData = require('form-data');
const filePath = `path/to/file.ext`;
const form = new FormData();
const stats = fs.statSync(filePath);
const fileSizeInBytes = stats.size;
const fileStream = fs.createReadStream(filePath);
form.append('field-name', fileStream, { knownLength: fileSizeInBytes });
@jimkang
jimkang / replace-with-sed.sh
Last active August 18, 2022 05:29
Example of replacing placeholders in multiple files with sed
#!/bin/bash
# Assuming $title and $name are read from input.
# ...
# Escaping space characters is only necessary within the shell script.
# If you're running the find...sed command directly in the shell, you don't need to escape spaces.
cleanedtitle="${title// /\\ }"
# Replace the placeholders with the title (with escape characters inserted).
@freshyill
freshyill / .eleventyconfig.js
Last active January 23, 2023 10:49
JSON feed template for eleventy-plugin-rss
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function(eleventyConfig) {
// Lots of other stuff probably goes here
eleventyConfig.addCollection("allUpdates", function(collection) {
return collection.getFilteredByGlob(["posts/*.md", "photos/*.md", "notes/*.md"]).sort(function(a, b) {
return b.date - a.date;
});
@igemnace
igemnace / vim_and_definitions.md
Last active March 7, 2022 22:45
"Jump to Definition" in Vim

Vim and Definitions

Did you know Vim has a few builtin features designed to help with the "Jump to Definition" action you see in most IDEs?

Level 1: include and define

Since Vim is a "dumb" editor (that is, it doesn't do any static analysis on your text), you'd expect a "Jump to Definition" feature that relies on a simple text search.

@dphiffer
dphiffer / uber.md
Last active January 11, 2019 18:15
Re: Working For Uber - Let's Connect!
@jochemstoel
jochemstoel / split_silence.sh
Created December 26, 2017 11:24 — forked from VojtechKlos/split_silence.sh
Guide to split audio recording by silence with SoX and ffmpeg
# First denoise audio
## Get noise sample
ffmpeg -i input.ogg -vn -ss 00:00:00 -t 00:00:01 noise-sample.wav
## Create noise profile
sox noise-sample.wav -n noiseprof noise.prof
## Clean audio from noise
sox input.ogg clean.wav noisered noise.prof 0.21