Skip to content

Instantly share code, notes, and snippets.

@steveway
steveway / rigol_dho_waveform.py
Created November 22, 2024 14:53
This should get the Waveform Data from the new Rigol DHO devices and formats it to be identical to saved .csv files from the device itself.
#! /usr/bin/env python3
import pyvisa as visa
from serial.serialutil import SerialException
from decimal import Decimal, getcontext
def main():
# Get list of connected devices
rm = visa.ResourceManager()
device_list = {}
for device_name in rm.list_resources():
@Haaroon
Haaroon / fallout new vegas steam deck mod guide.md
Last active April 18, 2024 19:28
how to install fallout new vegas on steam deck and install mods
@jam1garner
jam1garner / switch-gdb-cheatsheet.md
Last active November 13, 2025 07:29
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@idt12312
idt12312 / save_as_csv.py
Last active August 7, 2025 14:59
Load waveform and save it as csv file for RIGOL MSO5000 series oscilloscope
import visa
import argparse
import csv
def load_waveform(chidx, points_request):
inst.write(f':WAV:SOUR CHAN{chidx}')
inst.write(':WAV:MODE RAW')
inst.write(f':WAV:POIN {points_request}')
inst.write(':WAV:FORM BYTE')
@alexeyzimarev
alexeyzimarev / JsonNetRestSharp.cs
Created December 30, 2018 21:08
Using Newtonsoft.Json with RestSharp v106.6
using Newtonsoft.Json;
using RestSharp;
using RestSharp.Serialization;
namespace JsonNetRestSharp
{
class Program
{
static void Main(string[] args)
{
@wojteklu
wojteklu / clean_code.md
Last active November 28, 2025 16:21
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@angularsen
angularsen / MarginSetter.cs
Created January 17, 2015 12:19
WPF - Automatic horizontal or vertical spacing in StackPanel and other list like panels
using System.Windows;
using System.Windows.Controls;
using JetBrains.Annotations;
namespace Foo
{
public class MarginSetter
{
private static Thickness GetLastItemMargin(Panel obj)
{
@retvil
retvil / [IOC] Free Steam (Add Program)
Last active October 11, 2023 03:36
[IOC] Free Steam (Add Program)
(function()
{
if( location.href.match( /^https:\/\/store\.steampowered\.com\/account\/?$/ ) === null )
{
alert( 'Please run this on Steam\'s account page details: https://store.steampowered.com/account/' );
return;
}
var freePackages =
[
@DomiR
DomiR / Iphone.md
Last active October 22, 2021 00:05
Iphone passwordless ssh

Passwordless SSH

If you have no own key in ~/.ssh/ calld id_rsa.pub then create one:

ssh-keygen -t rsa

Copy the public file to the iphone