Skip to content

Instantly share code, notes, and snippets.

View adigie's full-sized avatar

Adrian Gielniewski adigie

View GitHub Profile
@adigie
adigie / c_cpp_properties_for_arm_toolchain.md
Created March 2, 2019 10:32 — forked from kbumsik/c_cpp_properties_for_arm_toolchain.md
VS Code c_cpp_properties.json example for arm-none-eabi toochain

VS Code c_cpp_properties.json example for arm-none-eabi toochain

If you installed C/C++ extension for Visual Studio Code but using GNU Arm Embedded Toolchain for ARM Cortex M series MCU target, VS Code will keep prompt "Configuring includePath for better IntelliSense results". You wil need a special c_cpp_properties.json for the ARM toolchain.

This works on both Linux and Windows.

  1. For arm-none-eabi-gcc users, its compiler include path should be included first. It differes in each system. Use the verbose arm-none-eabi-gcc -v flag to see include list. change "includePath" and "browse"."path" for your sys
@adigie
adigie / tmux-cheatsheet.markdown
Created April 6, 2018 20:44 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@adigie
adigie / tmux.md
Created April 6, 2018 20:32 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@adigie
adigie / bumblebee.conf
Created March 13, 2018 20:34
bumblebee
# Configuration file for Bumblebee. Values should **not** be put between quotes
## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=true
@adigie
adigie / 10-msp430.rules
Created March 13, 2018 20:19
msp430 rule
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0666", GROUP="users"
ENV{ID_MM_DEVICE_IGNORE}="1"
@adigie
adigie / recvRawEth.c
Created February 7, 2018 21:38 — forked from austinmarton/recvRawEth.c
Receive raw Ethernet frames in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/ip.h>
@adigie
adigie / sendRawEth.c
Created February 7, 2018 21:38 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@adigie
adigie / dummy.sh
Last active February 7, 2018 21:52
Create dummy interface
#!/usr/bin/env bash
modprobe dummy
ip link add dummy0 type dummy
ip link set dev dummy0 up