This file contains 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
--[[ | |
lvim config for c++,c,cuda,cuda,bash,python | |
]] | |
vim.opt.backup = false -- creates a backup file | |
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard | |
vim.opt.cmdheight = 2 -- more space in the neovim command line for displaying messages | |
vim.opt.colorcolumn = "99999" -- fixes indentline for now | |
vim.opt.completeopt = { "menuone", "noselect" } | |
vim.opt.conceallevel = 0 -- so that `` is visible in markdown files |
This file contains 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 | |
#stop on error | |
set -e | |
LOCAL_IF="enp2s0" | |
UPSTREAM_IF="enp2s0" | |
ifconfig ${LOCAL_IF} 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255 | |
# Disabled by default! | |
echo "1" > /proc/sys/net/ipv4/ip_forward |
This file contains 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 | |
MAIN_SERVER="192.168.1.8" | |
FAIL_OVER_SERVER="192.168.1.9" | |
PORT="80" | |
ACTIVE_SERVER=1 | |
SAMPLING_TIME="5" | |
while : | |
do | |
while ping -c 1 $MAIN_SERVER &> /dev/null |
This file contains 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
Log to debug matlab window creation and focus stealing. | |
######################################### window id:s, nice to have while looking at the log | |
1. start matlab via xtruss, shows splash screen 0x02000001 | |
2. main window shows 0x0240003d | |
3. run pause(10); figure(1) in matlab | |
4. new figure 0x02400095 | |
Notice the workspace ( 4 ), w#000000CD (parent) have been the same for diffrent matlab start ups on diffrent workspaces and always the same for all matlab windows |
This file contains 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
# Get llvm | |
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_370/final/ llvm | |
# Get clang | |
cd llvm/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_370/final/ clang | |
#Checkout Compiler-RT (required to build the sanitizers) [Optional]: | |
cd ../projects |
This file contains 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
#find no space befor ( for references in LaTex and add one | |
# Group () to \1 and \2 | |
# ( { \ are terminated by \( \{ \\ etc. | |
find ./rtthesisex/ -name "*.tex" -type f -exec sed -i -E 's/([A-Za-z])(\([A-Za-z]* \\ref\{[A-Za-z1-9:]*\}\))/\1 \2/' {} \; |
This file contains 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
#replace gcc with gcc 4.7 and g++ with g++-4.7 | |
sed -e s/gcc/gcc-4.7/g /usr/local/MATLAB/R2015a/bin/mexopts.sh | sed s/g\+\+/g\+\+-4.7/g > ~/.matlab/R2015a/mexopts.sh | |
#start matlab and see if it works |
This file contains 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 | |
#Install build dependencies | |
sudo dnf groupinstall "Development tools" | |
sudo dnf install mpfr-devel gmp-devel libmpc-devel zlib-devel glibc-devel.i686 glibc-devel | |
wget http://mirror2.babylon.network/gcc/releases/gcc-4.7.4/gcc-4.7.4.tar.bz2 | |
tar xvfj gcc-4.7.4.tar.bz2 | |
cd gcc-4.7.4 |