sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
## http://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
## Version: 3.8 | |
--- | |
BasedOnStyle: LLVM | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: AlwaysBreak | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlinesLeft: true | |
AlignOperands: true |
template <typename... Args> | |
std::vector<std::string> toStringVector(Args... args) { | |
std::vector<std::string> result; | |
auto initList = {args...}; | |
using T = typename decltype(initList)::value_type; | |
std::vector<T> expanded{initList}; | |
result.resize(expanded.size()); | |
std::transform(expanded.begin(), expanded.end(), result.begin(), [](T value) { return std::to_string(value); }); | |
return result; | |
} |
/** | |
* An Mirf example which copies back the data it recives. | |
* | |
* Pins: | |
* Hardware SPI: | |
* MISO -> 12 | |
* MOSI -> 11 | |
* SCK -> 13 | |
* | |
* Configurable: |
class Cfg { | |
public: | |
Cfg(std::initializer_list<std::pair<std::string, Cfg>> init) { | |
for (auto&& it: init) { | |
children_.insert(it); | |
} | |
} | |
Cfg(std::initializer_list<std::pair<std::string, std::string>> init) { | |
for (auto&& it: init) { | |
children_.insert(it); |
convert all images to a fixed width, expanding the trasparent background. useful to create sprites | |
for i in ../*.png; do convert $i -gravity NorthWest -background transparent -extent 200x150 $( basename $i ); done |
montage *png -tile 4x4 -geometry 200x150 -background transparent sprites.png |
while true; do sleep 1; npid="$( ps | grep Dia[g] | awk '{ print $1 }' )"; if [ "$npid" != "$pid" ]; then echo "$(date) crash detected"; fi; | |
pid=$npid; done |
curl http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add | |
echo 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main' >> /etc/apt/sources.list | |
apt-get update | |
apt-get install clang-3.8 lldb-3.8 |
sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
I want to change kernel parameters from u-boot.
printenv
Copy the value of mmcargs
.
Use setenv
to change the value of mmcargs
, adding what you need.