Skip to content

Instantly share code, notes, and snippets.

@pierluigi-failla
pierluigi-failla / time2vector.py
Created January 2, 2021 11:08
Slight variation of Tme2Vector implementation.
# -*- coding: utf-8 -*-
"""
Created by Pierluigi on 2020-09-30
"""
from tensorflow.keras.layers import Layer
from tensorflow.keras import backend as K
class Time2Vector(Layer):
""" Time2Vector
@mill1000
mill1000 / README.md
Last active April 22, 2024 07:24
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites

@probonopd
probonopd / linux_fusion360.md
Last active November 9, 2023 15:22
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

@zmts
zmts / tokens.md
Last active April 30, 2024 15:26
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@noosphere2
noosphere2 / ps3_eye_mic_fix_for_raspberry_pi.sh
Last active April 6, 2020 17:08
Fix for ps3 eye microphone on a raspberry pi requiring a physical unplug / reconnect on reboot to be useable as capture device
#!/bin/bash
# Logically eject and re-enable driver for Playstation Eye on a Pi running Raspbian Jessie.
# This is necessary because on boot, the microphone on the Eye will appear in `lsusb` and
# `arecord -l`, but will not function correctly (error "audio open error: Device or
# resource busy" or error "read error: Input/output error").
# Can read about others having this problem here https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=14903
# and here https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=15851&p=160394#p160394
# point a cronjob to this file, using the special @reboot nickname to run at startup.
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096