Skip to content

Instantly share code, notes, and snippets.

@hxii
hxii / README.md
Last active April 10, 2024 01:34
My Miniflux CSS

My Custom CSS for Miniflux

This are just a couple of handy, opinionated visual fixes that I personally use in my self-hosted instance of Miniflux.

You're more than welcome to grab a copy and use with your own instance, or modify to suit your needs.

@varenc
varenc / studio_display_catalina_fix.md
Last active June 22, 2023 01:50
Fix Studio Display apps freezing macOS 10.15 Catalina (Chrome, Zoom, WhatsApp, Discord, etc)

tl;dr; Run sudo launchctl stop com.apple.cmio.VDCAssistant to unfreeze your apps while using a Studio Display on macOS Catalina.


If you try to use Apple's new Studio Display on macOS Catalina 10.15.7 you end up with horrible app freezing problems. Apps like Chrome, Discord, WhatsApp, Zoom, Messenger, etc, are all freezing once a Studio Display is plugged in.

As someone pointed out on this thread, the "VDCAssistant" process seems to the source of the problems. This process is just related to managing video cameras for Apple services. And apparently disabling it fixes the app freezing issue!

So to fix the issue, just temporarily disable VDCAssistant by running this command in a Terminal:

@larsenv
larsenv / pbskids.py
Last active January 26, 2024 07:43
PBS Kids Video Downloader
import json
import requests
import subprocess
home = requests.get("https://content.services.pbskids.org/v2/kidspbsorg/home/").text
home = json.loads(home)
shows = {}
episodes = {}
@gruber
gruber / tot.sh
Last active July 1, 2022 13:58 — forked from chockenberry/tot.sh
A shell script for Tot
#!/bin/bash
# Fork of CHOCK's original tot.sh to add support for dot "0" to target
# the first empty dot.
# https://gist.github.com/chockenberry/d33ef5b6e6da4a3e4aa9b07b093d3c23
#
# 2 Mar 2020
# + Incorporated suggestions from ShellCheck (https://www.shellcheck.net).
# Thanks to Ramsey Dow.
# + Changed call to `python` to `/usr/bin/python` to get Python 2, avoiding
@mbleigh
mbleigh / README.md
Last active July 10, 2024 10:08
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
@maxboeck
maxboeck / donottrack.js
Last active November 6, 2023 10:00
Check "Do Not Track" Client Hint
const allowsTracking = () => {
const dnt =
window.doNotTrack ||
navigator.doNotTrack ||
navigator.msDoNotTrack
if (dnt === 1 || dnt === '1' || dnt === 'yes') {
return false
}
if ('msTrackingProtectionEnabled' in window.external) {
return !window.external.msTrackingProtectionEnabled()
@firatkucuk
firatkucuk / delete-slack-messages.js
Last active July 1, 2024 15:26
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
@nfarina
nfarina / mock-storage.js
Last active November 23, 2023 15:50
Mock Google Cloud Storage for JS
//
// Quick & Dirty Google Cloud Storage emulator for tests. Requires
// `stream-buffers` from npm. Use it like this:
//
// `new MockStorage().bucket('my-bucket').file('my_file').createWriteStream()`
//
class MockStorage {
buckets: {[name: string]: MockBucket};
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active July 8, 2024 20:42
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@dpapathanasiou
dpapathanasiou / dst.py
Created August 16, 2014 15:42
How to tell if Daylight Savings Time is in effect using Python
from datetime import datetime
import pytz
def is_dst ():
"""Determine whether or not Daylight Savings Time (DST)
is currently in effect"""
x = datetime(datetime.now().year, 1, 1, 0, 0, 0, tzinfo=pytz.timezone('US/Eastern')) # Jan 1 of this year
y = datetime.now(pytz.timezone('US/Eastern'))