This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#undef be16toh | |
void deserialize_u32(uint32_t &value, const uint8_t *bytes) | |
{ | |
value = | |
(static_cast<uint32_t>(bytes[0]) << 24) | | |
(bytes[1] << 16) | (bytes[2] << 8) | bytes[3]; | |
} | |
void deserialize_u24(uint32_t &value, const uint8_t *bytes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: python scons2ecc.py > compile_commands.json | |
The MIT License (MIT) | |
Copyright (c) 2017 Kim Blomqvist | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su root | |
apt-get install postgresql postgresql-client # cluster named as 'main' will be created automatically | |
adduser pgweb --disabled-login --disabled-password --shell /usr/sbin/nologin | |
apt-get install unzip | |
su pgweb -s /bin/bash | |
cd | |
wget https://github.com/sosedoff/pgweb/releases/download/v0.9.6/pgweb_linux_amd64.zip | |
unzip pgweb_linux_amd64.zip | |
mv pgweb_linux_amd64 pgweb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su root | |
aptitude install xorg openbox terminator iceweasel | |
pip install --upgrade pip | |
pip install --upgrade virtualenv | |
mount /dev/sr0 /media/cdrom | |
cd /media/cdrom | |
aptitude install linux-headers-$(uname -r) build-essential | |
sh ./VBoxLinuxAdditions.run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uses ULP from https://raw.githubusercontent.com/Sns22/Eagle_PCB_Libraries/master/Eagle-ulp-files/toggle-layer.ulp | |
Set Drill 0.15; | |
Change Shape Round; | |
ASSIGN C+R 'Route'; | |
ASSIGN A+R 'Ripup'; | |
ASSIGN C+M 'Move'; | |
ASSIGN C+G 'Group'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installation: | |
# cd my_gitproject | |
# wget -O pre-commit.sh http://tinyurl.com/mkovs45 | |
# ln -s ../../pre-commit.sh .git/hooks/pre-commit | |
# chmod +x pre-commit.sh | |
OPTIONS="-A8 -t8 --lineend=linux" | |
RETURN=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# vagrant box add wheezy32 https://dl.dropboxusercontent.com/u/78793012/vagrantup/wheezy32.box | |
$provisioner = <<SCRIPT | |
echo "#!/bin/bash | |
function InstallPip { | |
if [ '$(which pip)' ]; then | |
echo '-- Already installed.' | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# vagrant box add wheezy32 https://dl.dropboxusercontent.com/u/78793012/vagrantup/wheezy32.box | |
$provisioner = <<SCRIPT | |
echo "#!/bin/bash | |
function InstallAVR32 { | |
if [ '$(which /opt/avr32-tools/bin/avr32-gcc)' ]; then | |
echo '-- Already installed.' | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Backuping | |
# --------- | |
# dups3 backup | |
# | |
# Restoring | |
# --------- | |
# dups3 restore /home/my/foo.txt ~/restore # Restore a file | |
# dups3 restore /home/my ~/restore # Restore a directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
index index.html; | |
location = / {} | |
location / { try_files $uri.html $uri/ /404.html =404; } | |
} |
NewerOlder