Skip to content

Instantly share code, notes, and snippets.

View KubaO's full-sized avatar

Kuba Sunderland-Ober KubaO

View GitHub Profile
@KubaO
KubaO / SO Comments.md
Created July 28, 2017 21:04
Oft-used SO comments

Please do not vandalize your own questions by removing information and replacing it with "solved". Feel free to close your own questions if they are transient or irreproducible, and/or upvote and accept answers that helped you solve it. If no answer truly covers the fix, feel free to answer your own question!

@KubaO
KubaO / coltextread.m
Last active February 16, 2018 14:02
An Octave universal delimited file cell reader.
## Author: voithos on so
## Url: https://stackoverflow.com/a/8319848/1329652
function varargout = coltextread(fname, delim)
% Initialize the variable output argument
varargout = cell(nargout, 1);
% Initialize elements of the cell array to nested cell arrays
% This syntax is due to {:} producing a comma-separated
[varargout{:}] = deal(cell());
// complete compileable example begins
#include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
@KubaO
KubaO / rm-replace-refs.sh
Last active August 24, 2021 16:00
Remove all replace refs in git
# /bin/bash
# This removes all replace refs in the current repo, after logging them.
set -e
cmd=$(basename "$0")
logfile="~/.${cmd}.log.txt"
tmpfile=$(mktemp "${TMPDIR}/.${cmd}")
origin=$(git config --get remote.origin.url)
echo "# $(date) BEGIN ${origin}" >> "${logfile}"
@KubaO
KubaO / 4-20mA single.kicad_sch
Last active March 5, 2023 05:35
4-20mA Converter EE SO
(kicad_sch (version 20211123) (generator eeschema)
(uuid 1a16158f-96b7-446e-9b07-fa7168bd0f9f)
(paper "A")
(title_block
(title "4-20mA circuit IC troubleshooting")
(date "2023-03-04")
)

There are many ways of solving such circuits. For people who looked at lots of logic diagrams like these - they'll identify them pretty much just by looking at them for a minute. For someone who's just learning it for the first time, it helps to have a process. Here are the steps I'd take. You don't need to take those exact steps, of course!

  1. Replace the input lines with labels:

schematic

@KubaO
KubaO / README.md
Created January 31, 2024 21:51
EE.SO KiCad

This is a place for KiCad layouts/schematics for electronics.stackexchange.com.