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)
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 / 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 / .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": [
{
196.42.82.17
# 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 ->
@WoodyWoodsta
WoodyWoodsta / output-panel.txt
Last active January 9, 2018 15:49
Microsoft/vscode Issue #40725
[Info - 15:44:19] Using tsserver from: /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib
[Info - 15:44:19] TSServer log file: /Users/sean/Library/Application Support/Code - Insiders/logs/20180109T090501/vscode.typescript/tsserver-log-ac1Nhr/tsserver.log
[Info - 15:44:19] Forking TSServer
PATH: /Users/sean/.nvm/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sean/.config/yarn/global/node_modules/.bin/
[Info - 15:44:19] Started TSServer
[Error - 15:44:30] 'occurrences' request failed with error.
Error processing request. Could not find file: '/Users/sean/ITDev/projects/draw-group/OW-enercity-ed4-integration-layer/ed4-front-end-integration-layer/common/models/subscription.js'.
Error: Could not find file: '/Users/sean/ITDev/projects/draw-group/OW-enercity-ed4-integration-layer/ed4-front-end-integration-layer/common/models/subscription.js'.
at getValidSourceFile (/Applications/Visual Studio Code - Insiders.app/Content