Skip to content

Instantly share code, notes, and snippets.

View LucasPlacentino's full-sized avatar
💡
Learning Rust 🦀 and PCB design 📟

ticccco LucasPlacentino

💡
Learning Rust 🦀 and PCB design 📟
View GitHub Profile
@jrsmith3
jrsmith3 / sla2pdf.py
Created March 12, 2014 01:31
Converts every scribus document to a PDF in a specified directory.
"""
Convert every .sla to a pdf in a specified directory.
This script can only be run from within [scribus](http://http://scribus.net).
"""
import os
work_dir = #you have to explicitly tell scribus where your working directory is.
filenames = os.listdir(work_dir)
@manugarri
manugarri / README.rst
Created May 11, 2016 12:25 — forked from livibetter/README.rst
Frequency spectrum of sound using PyAudio, NumPy, and Matplotlib

This Gist is about how I use PyAudio, NumPy, and Matplotlib to plot freqency spectrum of system sound or microphone.

You can read this blog post for more detail or watch this video:

https://i.ytimg.com/vi/hiGB_AP6iTo/maxresdefault.jpg
@MightyPork
MightyPork / usb_hid_keys.h
Last active June 5, 2024 18:59
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@diachedelic
diachedelic / broken.svg
Created November 9, 2017 01:13
Netscape navigator broken image icon as SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active June 18, 2024 16:46
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@Firsh
Firsh / lwp-cloudflare-dyndns.sh
Last active January 6, 2024 15:38
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="email@example.com"
auth_key="global_api_key_goes_here"
zone_name="example.com"
@crrapi
crrapi / webserver_and_bot.py
Last active December 7, 2023 16:47
(Don't use if you can) Run a Flask app and a discord.py bot in one program using threads.
# Note: You really should not use this.
# You can easily convert your app
# to use Quart by using async+await
# and then use loop.create_task(bot.start(...))
# before using app.run.
from threading import Thread
from flask import Flask
from functools import partial
from discord.ext import commands
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active June 14, 2024 08:32
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@mmarquez76
mmarquez76 / MotionWarn.ino
Last active April 16, 2023 15:40
Flash WiZ-connected light bulbs when a motion sensor is tripped using Arduino
/*
Motion-Sensing Warning Lights
This sketch will wait for a high input on D2 from the PIR motion
sensor, and then flash WiFi-connected lights to alert the room.
Circuit:
HC-SR501 PIR motion sensor attached, input on digital pin 2
created 30 July 2020