Skip to content

Instantly share code, notes, and snippets.

View beriberikix's full-sized avatar
🐶
I have no idea what I'm doing

Jonathan Beri beriberikix

🐶
I have no idea what I'm doing
View GitHub Profile
@mbinna
mbinna / effective_modern_cmake.md
Last active May 6, 2024 17:19
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

(This guide is based on my following this other guide: https://embdev.net/articles/STM_Discovery_as_Black_Magic_Probe)

If you have a BMP or some other device with the BMP firmware already, flashing the ST-Link processor (the F103) on a Discovery board is straightforward. But if all you have is one Discovery board - like me - it's possible, but has to be done in a roundabout way.

Discovery boards are really two different parts. Right next to CN1 - the mini-USB connector - is the ST-Link section, which is powered by a small STM32F103 MCU. It has its own bootloader and firmware, separate from the device under test. This ST-Link section is normally responsible for loading, running, and debugging programs on the device under test (DUT).

The DUT is the larger STM part in the middle of the board. I have an STM32F4 Discovery board which has an F407 as the "test" MCU. What we're going to take advantage of is a feature called the DFU bootloader which will allow us to bypass the ST-Link section and instead direct

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
#! /bin/sh
# Commands taken from http://guttula.com/STM32F4/toolchain-setup.html
sudo apt-get install git screen
# Install gcc toolchain for arm M*
sudo apt-get install binutils-arm-none-eabi
sudo apt-get install gcc-arm-none-eabi
@ajfisher
ajfisher / _readme.md
Last active November 21, 2023 16:28
Auto WiFi detection and hotspot creation in boot for RPI

Auto WiFi detection or wifi hostpot creation during boot for RPI

Note: These are rough notes and there may be some variance as versions of raspbian get updated but should be pretty reliable as a guide.

This gist provides some instructions and config in order to have your Raspberry PI automatically connect to a roamed network, however if it fails to discover an available network it will set itself up as a wireless access point for you to connect to.

@Shoom
Shoom / gist:9622e6e09ca6be63f98f
Last active July 19, 2018 11:52
CSSconf EU 2014
{
"cssconf": {
"location": {
"date": "September 12, 2014",
"country": "Germany",
"city": "Berlin",
"venue": "Radialsystem V",
"lat": 52.51039,
"long": 13.42864
},
@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@evanscottgray
evanscottgray / docker_kill.sh
Last active November 7, 2023 03:40
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt