Skip to content

Instantly share code, notes, and snippets.

View huettern's full-sized avatar

Noah Huetter huettern

View GitHub Profile
@huettern
huettern / delugedsetup.sh
Created June 7, 2017 19:26
Install deluged and deluge-webui on ubuntu
sudo adduser deluge --shell /dev/null --disabled-password --disabled-login
sudo apt install deluged deluge-webui
sudo gpasswd -a $USER deluge
cat <<EOF | sudo /etc/systemd/system/deluged.service
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
@huettern
huettern / usbcdc.c
Last active June 4, 2017 12:42
ChibiOS C shell variables
/**
* File: usbcdc.h
*/
typedef struct
{
const char* name;
float* loc;
} usbcdcParameterStruct_t;
void usbcdcSetShellVars(const usbcdcParameterStruct_t** vars);
%% Poly with skin
clear; clc;
l=1e-6; c0=1e-9;
r0=100; f0=1000; alpha=0.8;
w=[2000 3000];
w=(2*pi).*w;
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g.create();
Area plotArea = new Area(new Ellipse2D.Double(center.x-radius, center.y-radius, diameter,diameter));
g2.setClip(plotArea);
}