Skip to content

Instantly share code, notes, and snippets.

View msis's full-sized avatar
Building The Future of Maritime

Mohamed Saad Ibn Seddik msis

Building The Future of Maritime
View GitHub Profile
@msis
msis / example.pro
Last active February 4, 2018 23:08
[adding qwt to Qt project] #Qt #project #qwt
#your stuff here
include(/usr/local/qwt-6.1.1/features/qwt.prf)
CONFIG += qwt
@msis
msis / example.pro
Last active February 4, 2018 23:07
[Adding ibex to Qt project] Automatically configuring Qt project to use ibex #Qt #ibex #pkg_config
#your stuff here
CONFIG += link_pkgconfig
PKGCONFIG += ibex
@msis
msis / export.sh
Last active February 4, 2018 23:07
[update linker library path] When newly installed libraries can't be found by linker #shell #lib #LD_LIBRARY_PATH #export
## Add freshly installed libraries
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
@msis
msis / 0Inbox.sh
Last active February 4, 2018 23:05
[0-inbox for Outlook.com with Firefox] #outlook.com #bash #script #shell #firefox
#!/bin/bash
#this script looks for a window named Mozilla Firefox and then starts procedure to select all mails in the current folder and archive them
for i in {1..30}
do
xdotool search --name "Mozilla Firefox" key s+a
xdotool search --name "Mozilla Firefox" key e
sleep 5
done
@msis
msis / exportQt2Cmake.sh
Last active February 4, 2018 23:04
[Use web installed Qt w/ CMake] #bash #env #CMake #Qt
#!/bin/bash
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$HOME/Qt/5.4/gcc_64
@msis
msis / mount_iso.sh
Last active February 4, 2018 23:04
[Mount iso file Linux] #shell #bash #iso
#!/bin/bah
mount -o loop -t iso9660 file.iso /mnt/test
@msis
msis / manual-qt5.conf
Last active February 4, 2018 23:04
[Export manually installed Qt5 libraries] #Qt #LD_LIBRARY_PATH #lib
# To be copied in /etc/ld.so.con.d/
# Manually installed Qt5
/home/big/Qt/5.4/gcc_64/lib
# Do not forget to run ldconfig after to update the cache!
@msis
msis / CMakeLists.txt
Last active February 4, 2018 23:03
[Enable range for loop in C++ from CMakeLists.txt] #Cmake #C++ #for
# when using the new C++11 for loops:
# for (auto i : range) {}
target_compile_features(myapp PRIVATE cxx_range_for)
#!/bin/bash
# Mohamed Saad Ibn Seddik
set -e # exit with nonzero exit code if anything fails
# go to the out directory
cd ${DEPLOY_DIR} || exit 1
# initiate new git repo inside the new deploy folder
git init
@msis
msis / lxc_snap_error_squashfuse.md
Last active February 4, 2018 22:54
[snap on lxc error] Running snap inside a lxc container errors. #lxc #snap #squash #squashfuse

When running snap inside lxc container, snap install might fail with the following output for :

$ systemctl status snap-core-2898.mount
● snap-core-2898.mount - Mount unit for core
   Loaded: loaded (/etc/systemd/system/snap-core-2898.mount; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2017-09-26 15:36:39 UTC; 26s ago
    Where: /snap/core/2898
     What: /var/lib/snapd/snaps/core_2898.snap