Skip to content

Instantly share code, notes, and snippets.

View mattico's full-sized avatar
🦀
Embedded Rust

Matt Ickstadt mattico

🦀
Embedded Rust
  • Beck Enterprises
View GitHub Profile
@diondokter
diondokter / README.md
Last active August 4, 2020 23:03
STM32H7 ITM setup

ITM setup for the STM32H7 with OpenOCD

Currently the ITM is broken. This is my current setup.

  • VSCode with Cortex Debug plugin
  • STM32H743

Both .cfg files are put in the project folder so OpenOCD can find them.

@gene1wood
gene1wood / bitwarden-amazon-aws-credential-setup.md
Last active March 22, 2024 22:53
How to get BitWarden to differentiate between amazon.com consumer retail logins, AWS root logins and AWS IAM user logins

Here's how to get BitWarden to treat these three different types of Amazon logins as separate

  • amazon.com consumer retail business login
  • AWS root user login (AWS logins that use an email address)
  • AWS IAM user login (AWS logins that use a username)

amazon.com consumer retail

  • Set URI 1 to Exact with a value of

    https://www.amazon.com/ap/signin?_encoding=UTF8&ignoreAuthState=1&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2F%3Fref_%3Dnav_custrec_signin&switch_account=

@cs2dsb
cs2dsb / system.rs
Created July 30, 2017 20:10
Configuring stm32f7 for 216MHz using svd2rust api
///This configures the clock for full 216mHz performace. Copied from SystemClock_Config() in ST hal examples
fn configure_clock(&self, rcc: &RCC, pwr: &PWR, flash: &FLASH) {
/* Enable HSE Oscillator and activate PLL with HSE as source */
//Enable the HSE
rcc.cr.modify(|_, w| w.hseon().enabled());
//Wait till HSE is ready (should add a timeout comparing to HSE_STARTUP_TIMEOUT
//hprintln!("Waiting for HSE to be ready");
wait_until_true(&|| rcc.cr.read().hserdy().bit_is_set());
//hprintln!("HSE is ready");
@rakka74
rakka74 / DirectWriteTextBlock.xaml
Last active July 6, 2017 02:11
WPFDXInteropを使ってDirectWriteでテキスト描画するサンプル(C++/CLI版)
<UserControl x:Class="DirectWriteTextBlockApp3.DirectWriteTextBlock.DirectWriteTextBlock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DirectWriteTextBlockApp3.DirectWriteTextBlock"
xmlns:dx="clr-namespace:Microsoft.Wpf.Interop.DirectX;assembly=Microsoft.Wpf.Interop.DirectX"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" SizeChanged="UserControl_SizeChanged">
<Grid Background="Red">
@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#

Or what the hell do #![no_start], #![no_main], #[lang = "start"], #[start], and #[main] do?

Crate Attributes:

#![no_start]

Disable automatically linking in the native crate and thus the default start lang item.

Which means you'll probably need one of: #![no_main], #![lang = “start”] or #[start] instead