Skip to content

Instantly share code, notes, and snippets.

View rhaamo's full-sized avatar
💭
squeak squeak

Valérianne rhaamo

💭
squeak squeak
View GitHub Profile
@cbassa
cbassa / keogram.py
Created January 5, 2023 09:00
Create a keogram for 24h of images
#!/usr/bin/env python3
import sys
import tqdm
from pathlib import Path
import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u
from astropy.time import Time
@fauxpark
fauxpark / keymap.c
Last active March 26, 2023 20:48
rawhid in python
#include <string.h>
// This function is called when a packet is received on the raw HID interface.
// `length` will always be the size of the output (host to device) report in bytes - 32 in current QMK, but will eventually be raised to 64.
// Thus, if you wish to send variable length data, you should send the length along with the payload, splitting across multiple reports
// if needed, and handle the parsing yourself.
//
// In this simple example, we check that the first byte of the received data is the ASCII character 'A',
// in which case we respond with 'B' and toggle the backlight.
void raw_hid_receive(uint8_t *data, uint8_t length) {
@Aldarone
Aldarone / ffwebm
Last active May 10, 2018 15:43
Small script to encode your vlog to VP9+Opus in webm before sending it to Peertube
#!/bin/env bash
# Usage :
# ffwebm input_file output_file [video_bitrate [audio_bitrate]]
INPUT=${1}
OUTPUT=${2}
BITRATE=${3:-1000k}
AUDIO_BITRATE=${4:-64k}
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
import noise
width = 600
height = 300
freq = 160.0
image = Image.new("RGBA", (width, height))
pixels = image.load()
@istepanov
istepanov / Configuration.h
Last active July 26, 2023 16:45
Marlin Anet A8 config
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@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.

@patrickfuller
patrickfuller / alias_dns.py
Last active January 29, 2024 16:29
Enables local DNS resolution of Unifi aliases
"""
When run in cron, automatically adds compliant alias names to local DNS.
Use at your own risk.
Patrick Fuller, 25 June 17
"""
import re
import paramiko
import pymongo
@drmpeg
drmpeg / gr-paint.md
Last active December 9, 2023 20:11
How to create high quality gr-paint images.

High Quality Spectrum Painting

A quick tutorial on how to get high quality images from gr-paint and Gqrx.

Spectrum Example

Setup

  • Use a newer version of Gqrx with Ref. level and dB range sliders.
  • Set the FFT size in Gqrx to 32768
@maximilian-lindsey
maximilian-lindsey / express_in_electron.md
Last active March 29, 2024 22:46
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app