Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sehraf
sehraf / hidden_node_tor_machine.patch
Created August 3, 2015 13:56
this patch allows tor proxy/tor hidden service to run on a different machine than the rs hidden node
Index: libretroshare/src/pqi/p3linkmgr.cc
===================================================================
--- libretroshare/src/pqi/p3linkmgr.cc (Revision 8611)
+++ libretroshare/src/pqi/p3linkmgr.cc (Arbeitskopie)
@@ -1797,7 +1797,12 @@
std::cerr << std::endl;
#endif
- if (sockaddr_storage_samenet(mLocalAddress, addr))
+ struct sockaddr_storage localHost;
@sehraf
sehraf / lcd-bme280.ino
Last active August 20, 2019 15:00
Arduino sketch to show BME280 readings on a LCD display
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <LiquidCrystal_I2C.h>
#define BME280_Addr (0x76)
#define SEALEVELPRESSURE_HPA (1013.25)
@sehraf
sehraf / speedControl.py
Last active February 24, 2020 16:07
Example on how to query and change max up/download rates in RetroShare using the json api.
#!/usr/bin/python3
import json, requests, re
debug = False
port = 9092
user = 'test'
pw = 'tset'
#pragma once
#include <AudioOutput.h>
class AudioOutputFixedRates : public AudioOutput
{
public:
AudioOutputFixedRates(AudioOutput *dest);
virtual ~AudioOutputFixedRates() override;
virtual bool SetRate(int hz) override { return true; }
#include "AudioOutputFixedRates.h"
AudioOutputFixedRates::AudioOutputFixedRates(AudioOutput *dest)
{
sink = dest;
}
AudioOutputFixedRates::~AudioOutputFixedRates() {}
bool AudioOutputFixedRates::SetFixedRate(int hz)
@sehraf
sehraf / PKGBUILD
Created April 10, 2022 18:11
PKGBUILD for riscv distccd support (symlinks)
pkgname=distccd-riscv64
pkgver=1
pkgrel=0
pkgdesc='Provides sym-links for distccd'
arch=('any')
license=('MIT')
source=()
sha256sums=()
depends=('distcc' 'riscv64-linux-gnu-gcc')
@sehraf
sehraf / PKGBUILD
Created April 18, 2022 21:10
creates symlinks for riscv64 distcc
pkgname=distccd-riscv64
pkgver=1
pkgrel=0
pkgdesc='Provides sym-links for distccd'
arch=('any')
license=('MIT')
source=()
sha256sums=()
depends=('distcc' 'riscv64-linux-gnu-gcc')
@sehraf
sehraf / gpu-driver-list.md
Last active May 9, 2022 15:06
List of open source graphic hardware/software drivers as well as translation layers

Hardware based

Vendor Name OpenGL Vulkan
AMD Radeon radeonsi,r600 radv
ARM Mali lima, panfrost PanVK
Broadcom VideoCore VC4, VC5/V3D V3DV
Imagination Technologies PowerVR PVR
Intel multiple i915, i965, iris ANV
Nvidia GeForce nouveau
Qualcomm Adreno freedreno turnip
@sehraf
sehraf / foo.js
Created January 4, 2023 19:17
Tamper Monkey: Steam Free License Batch Remover
// ==UserScript==
// @name Steam Free License Batch Remover
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://store.steampowered.com/account/licenses/
// @icon https://www.google.com/s2/favicons?sz=64&domain=simply-how.com
// @grant none
// ==/UserScript==
@sehraf
sehraf / convert.py
Last active January 9, 2023 13:13
Skryim RaceMenu BodySlide morphe converter. Converts the racemenu preset BodySlide morphs to a BodySlide studio preset. Tested once with mixed results...
import json
import xml.etree.ElementTree as ET
import xml.dom.minidom as MD
# BodySlide options, too be completed
bodyslide_elems = [
"Ankles",
"AppleCheeks",
"Arms",
"Back",