Skip to content

Instantly share code, notes, and snippets.

View sash13's full-sized avatar

Aleksander Ryzhkov sash13

  • Kyiv, Ukraine
  • 04:38 (UTC +02:00)
View GitHub Profile
@fffonion
fffonion / setup-dashbutton.py
Created September 28, 2019 22:32
Setting up dash button without Amazon App
import requests
import re
import sys
# Initial work from: https://mpetroff.net/2016/07/new-amazon-dash-button-teardown-jk29lp/
h = requests.Session()
BASE_URL = "http://192.168.0.1"
@fo40225
fo40225 / ubuntu1804cuda10.sh
Last active August 22, 2023 19:18
install cuda 10 on ubuntu 18.04
# echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null
# echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null
# sudo update-initramfs -u
sudo apt update
sudo apt -y install build-essential
sudo apt update
sudo apt -y install linux-headers-$(uname -r)
@kytulendu
kytulendu / install-opencl-amd.sh
Last active October 21, 2024 14:26
A shell script to install AMDGPU-PRO OpenCL driver.
#!/bin/bash
# This script will install AMDGPU-PRO OpenCL and Vulkan support.
#
# For Ubuntu and it's flavor, just install the package using this command
# in extracted driver directory instread.
#
# ./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms
#
# For Arch Linux or Manjaro, use the opencl-amd or rocm-opencl-runtime on AUR instread.
@JyeSmith
JyeSmith / RX5808_set_freq_example.ino
Last active March 23, 2024 23:04
RX5808 set freq example
#include <SPI.h>
#define SPI_ADDRESS_SYNTH_B 0x01
#define PIN_SPI_SLAVE_SELECT 22
#define RSSIA_PIN 36
#define RSSIB_PIN 39
uint16_t freq = 5740;
void setup() {
@kotobuki
kotobuki / script.js
Last active August 7, 2024 14:34
Web Bluetooth with micro:bit (UART)
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
// An implementation of Nordic Semicondutor's UART/Serial Port Emulation over Bluetooth low energy
const UART_SERVICE_UUID = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
// Allows the micro:bit to transmit a byte array
const UART_TX_CHARACTERISTIC_UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
// Allows a connected client to send a byte array
const UART_RX_CHARACTERISTIC_UUID = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
@marcan
marcan / gamma_trick.sh
Last active November 18, 2024 16:33
Two images in one using the PNG gamma header trick.
#!/bin/sh
# PNG Gamma trick (by @marcan42 / [email protected])
#
# This script implements an improved version of the gamma trick used to make
# thumbnail images on reddit/4chan look different from the full-size image.
#
# Sample output (SFW; images by @Miluda):
# https://mrcn.st/t/homura_gamma_trick.png
# https://www.reddit.com/r/test/comments/6edthw/ (click for fullsize)
# https://twitter.com/marcan42/status/869855956842143744
@franga2000
franga2000 / Xiaomi YI.md
Last active May 14, 2024 20:17
Xiaomi Yi

Xiaomi Yi camera

General info

  • OS: Buildroot
  • CPU: ARMv6-compatible processor rev 5 (v6l)
  • BogoMIPS: 524.28
  • Memory: 37MB

The root filesystem is rootfs, which is stored in memory and therefore wiped on reboot. The Micro SD card is mounted at /tmp/fuse_d/. Something is also mounted at /tmp/fuse_a and /tmp/fuse_z.

@monsonite
monsonite / SIN_pwn_50Hz.ino
Created October 3, 2015 14:58
A 50Hz sinusoid generator for the Open Inverter Project
/*
50Hz 8-bit sinusoid pwm driver for Open Inverter Project
Complimentary pwm available on Digital 3 and Digital 11
Ken Boak & Trysatn Lea #bothyHack - September 2015
*/
#include "ets_sys.h"
#include "driver/i2c_master.h"
#include "driver/uart.h"
#include "osapi.h"
#include "os_type.h"
#include "user_interface.h"
#include "functions.h"
#include "config.h"
os_event_t user_procTaskQueue[user_procTaskQueueLen];
@armornick
armornick / openicon.c
Created August 23, 2012 08:47
Draw an Image with SDL2
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#define WIDTH 800
#define HEIGHT 600
#define IMG_PATH "exit.png"
int main (int argc, char *argv[]) {