Skip to content

Instantly share code, notes, and snippets.

@alfonsrv
alfonsrv / camera.py
Last active April 26, 2024 22:32
Motion detection with OpenCV + grab static snapshot every 1 second from RTSP video stream
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) Rau Systemberatung GmbH (rausys.de)
# MIT License
# credits: https://pyimagesearch.com/start-here/
import argparse
import os
from datetime import datetime, timedelta

Description

When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token. In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE (change that to your API Token) or add that to your .bash_profile and then do source .bash_profile.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 22:33
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
@sylvainfaivre
sylvainfaivre / thinkpad_cpu_throttling_lap_mode.md
Last active April 26, 2024 22:26
CPU throttling and "lap mode" on Lenovo Thinkpad laptops

CPU throttling and "lap mode" on Lenovo Thinkpad laptops

Test setup

Hardware : Lenovo Thinkpad P14s, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

Software : Ubuntu 21.10, Gnome 40.4.0, Linux 5.13.0

Background

@alfonsrv
alfonsrv / argon-eon.md
Last active April 26, 2024 22:25
Argon EON allow hard drive spin down with hd-idle – EON spin down idle disks

Argon EON's OLED display does not allow for tools like hd-idle to detect when drives are inactive due to constant temperature, RAID and usage checks, thus preventing spin down of the drives.

The responsible Python script is slowed down to a more senseful value using the decorator / extra bit of code below.

Simply insert the code from the Gist below in your /etc/argon/argonsysinfo.py and add @no_spinup above the following functions that already exist within the file:

@ngtrphuong
ngtrphuong / ABC.md
Created April 16, 2024 03:40 — forked from jdnichollsc/ABC.md
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛