Skip to content

Instantly share code, notes, and snippets.

View WoodyWoodsta's full-sized avatar
🏄‍♂️
🇿🇦🇬🇧

Sean Wood WoodyWoodsta

🏄‍♂️
🇿🇦🇬🇧
View GitHub Profile
@WoodyWoodsta
WoodyWoodsta / LEDBlinkSTM32F051C6.c
Created July 14, 2015 18:50
LED Blink example using register accessing
// Paste this at the top of your main file
#define EVER ;;
#define RCC_PERHIPHBASE 0x40021000
#define RCC_AHBENR (RCC_PERHIPHBASE + 0x14)
#define GPIOB_PERIPHBASE 0x48000400
#define GPIOB_MODER (GPIOB_PERIPHBASE + 0x00)
#define GPIO_ODR (GPIOB_PERIPHBASE + 0x14)
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
STM32F0x -> STLinkv2:
sudo openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg
@WoodyWoodsta
WoodyWoodsta / includeGuard.h
Last active October 27, 2015 09:23
Multiple inclusion guard tactic for C explained
/** To prevent your code having multiply included header files,
* and hence possibly multiply declared functions and variables,
* the following tactic is used in the file to be included which will
* prevent the code from being compiled more than once.
*/
// The "ifndef" combined with the matching "endif" directives serve as a pre-processor
// "if not defined" statement, where the code between these two directives will only
// Be compiled if, in this case, the symbol "NAME_OF_HEADER_FILE_H" has not been defined.

#local-npm setup To install service for local-npm using forever-service:

$ sudo rm /usr/bin/node

$ sudo ln -s "$(which node)" /usr/bin/node

$ sudo forever-service install local-npm-service --script /home/<user>/.nvm/versions/node/<node-version>/lib/node_modules/local-npm/bin.js -o " -d /home/<user>/.local-npm" -p /home/<user>/.nvm/versions/node/<node-version>/bin --start
@WoodyWoodsta
WoodyWoodsta / .babel.json
Last active September 27, 2016 09:44
Elementary OS setup stuff
{
"{\"filename\":\"/mnt/Data/ITDev/gitsub/experimental/v-engine/src/__tests__/index.es6\",\"env\":{},\"retainLines\":false,\"highlightCode\":true,\"suppressDeprecationMessages\":false,\"presets\":[],\"plugins\":[[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null],[[],null]],\"ignore\":[],\"code\":true,\"metadata\":true,\"ast\":true,\"comments\":true,\"compact\":\"auto\",\"minified\":false,\"babelrc\":true,\"sourceType\":\"module\",\"moduleIds\":false,\"passPerPreset\":false}:6.10.4": {
"metadata": {
"usedHelpers": [
"interopRequireWildcard"
],
"marked": [],
"modules": {
"imports": [
{
@WoodyWoodsta
WoodyWoodsta / redshift.conf
Last active March 15, 2016 17:31
Redshift setup
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=6000
temp-night=2000
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1
@WoodyWoodsta
WoodyWoodsta / .bash_aliases
Last active November 30, 2018 16:13
What I have done to set the Intel Edison up
### Directory
alias ll="ls -lv"
alias lla="ls -alv"
alias glg="git log --pretty='format:%Cgreen%h%Creset %an - %s' --graph"
alias gl="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen %cr %an%Creset'"
alias gs="git status"
alias gd="git diff"
# add
alias ga="git add"
196.42.82.17