Skip to content

Instantly share code, notes, and snippets.

@Synergyst
Synergyst / NBFM_TX_RX.grc
Created March 18, 2024 09:09
Nearband FM transmitter/receiver GNURadio Companion example
options:
parameters:
author: Synergyst
catch_exceptions: 'True'
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
@Synergyst
Synergyst / dtmf_test.rs
Created February 29, 2024 07:28
dtmf_test
extern crate rustfft;
extern crate num_complex;
use std::f32;
use std::{thread, time::Duration};
use std::collections::HashMap;
use std::process::Command;
use jack::{AsyncClient, Client, ClosureProcessHandler, ProcessScope};
fn main() {
/*
*
* V4L2 video capture test program
* This is a modified version of the V4L2 API program, see: http://linuxtv.org/docs.php for more information
*
* This is not meant to be representative of a production-ready program, it may not work without heavy modification..
* Lots of variables, functions, etc may be named incorrectly, have issues, etc.
* This file gets updated frequently with test code; please understand that a lot of parts of it may not make any sense. :)
*
* Understanding that this is really meant for internal-use only/testing; feel free to modify/reuse/distribute this code in any way without restrictions.
@Synergyst
Synergyst / ethminer_ubuntu_nvidia.md
Created June 28, 2021 20:53 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

WARNING: THESE WORDS ARE OLD AND MAY NOT WORK FOR YOU IN THESE NEW AND INTERESTING TIMES.

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

@Synergyst
Synergyst / TS3AudioBot_startscript.sh
Created September 8, 2017 09:42
A TS3AudioBot daemon script
#!/bin/sh
# Copyright (c) 2010 TeamSpeak Systems GmbH (edited by Pawkow for use with TS3AudioBot: https://github.com/Splamy/TS3AudioBot)
# All rights reserved
# Drop this script into the folder with the TS3AudioBot.exe binary and run! :D
COMMANDLINE_PARAMETERS="${2}" #add any command line parameters you want to pass here
D1=$(readlink -f "$0")
BINARYPATH="$(dirname "${D1}")"
cd "${BINARYPATH}"
LIBRARYPATH="$(pwd)"
@Synergyst
Synergyst / synergy-wrapper.sh
Last active May 8, 2017 10:39
Symless Synergy VNC Detection Script
#!/bin/bash
while true ; do
if [[ `ps aux | grep synergy | grep -v "Sl+" | grep -v "S+" | awk '{print $8}'` != "" ]]; then
echo "Found and killing duplicate Synergy session.."
(sleep 5 ; kill `ps aux | grep synergy | grep -v "synergys" | grep -v "Sl+" | grep -v "S+" | awk '{print $2}'` ; killall droidmote ; sleep 5 ; synergy-wrapper) &
fi
if [[ `cat /tmp/synergy-start-stop-disable-state` == "allow" ]]; then
#include <DirectIO.h>
#include "HID-Project.h"
/*
* This is the pin that will tie into the mouse.
* The button on the mouse MUST tie to ground when pressed,
* otherwise this sketch will need to be modified appropriately..
*/
Input<4> my_input(false);
#include "HID-Project.h"
/*
* Benchmark results were determined by using the following projecct-unrelated website: https://cookie.riimu.net/speed/
*
* Refresh rates to MS ratio translations(REL / HLD)
* 10 / 10 = smooth 48Hz
* 9 / 10 = smoothed 48 to 52Hz
* 8 / 10 = semi-smooth 52Hz
* 7 / 10 = smooth 56Hz
#include "HID-Project.h"
#define maxMoveAmt 1
#define encoder0PinA 2
#define encoder0PinB 3
#define encoder0Button 4
volatile unsigned int encoder0Pos = 0;
unsigned int tmp_Pos = 1;
unsigned int valx;