Skip to content

Instantly share code, notes, and snippets.

@geerlingguy
geerlingguy / pi-cpu-stress.sh
Last active March 28, 2024 15:20
Raspberry Pi CPU temperature and throttling test script
#!/bin/bash
# Raspberry Pi stress CPU temperature measurement script.
#
# Download this script (e.g. with wget) and give it execute permissions (chmod +x).
# Then run it with ./pi-cpu-stress.sh
#
# NOTE: In recent years, I've switched to using s-tui. See:
# https://github.com/amanusk/s-tui?tab=readme-ov-file#options
# Variables.
@marcan
marcan / canon-ef-protocol-notes.md
Last active April 10, 2024 14:18
Canon EF protocol notes

Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.

Pinout

  1. VBAT
  2. DET (common with P-GND on lens side)
  3. P-GND
  4. VDD
  5. DCL
  6. DLC
@dmn001
dmn001 / apple 4k SDR screensavers (2018-09).md
Last active October 31, 2021 19:55
apple 4k SDR screensavers (2018-09)

here are the latest set of urls for the apple 4k sdr videos/screensavers ( https://9to5mac.com/2018/09/17/tvos-12-features/ ) which includes the nasa/ISS space flyovers:

the url was found here:

JohnCoates/Aerial#463 (comment)

quote:

"The format changed somewhat; you need to extract the JSON out of here https://sylvan.apple.com/Aerials/resources.tar. The JSON includes the URLs to the videos and the time markers for the tvOS 12 captions as a dictionary, keyed by time. The values of this dictionary are keys which can be found in the strings plists."

@jkutner
jkutner / atik-indi-phd2-raspbian-instructions.md
Last active January 19, 2024 19:09
Turn a Raspberry Pi into an Astrophotography Autoguider
@aplz
aplz / draw_text_with_background_opencv.py
Last active September 3, 2023 22:56
draw text with background // opencv
import cv2 # opencv
import numpy as np
font_scale = 1.5
font = cv2.FONT_HERSHEY_PLAIN
# set the rectangle background to white
rectangle_bgr = (255, 255, 255)
# make a black image
img = np.zeros((500, 500))
# Code adapted from Tensorflow Object Detection Framework
# https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb
# Tensorflow Object Detection Detector
import numpy as np
import tensorflow as tf
import cv2
import time
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

How To - Upload and add Images to markdown files in Gist

Markdown files allow embedding images in it. However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example: ![Alternate image text](https://someurl/imagelocation/image.png)

We can use services like imgur or other services to host the images and use the hosted URL.

@leoloobeek
leoloobeek / get_gists.py
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@magnetikonline
magnetikonline / README.md
Last active February 4, 2024 07:45
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.