Skip to content

Instantly share code, notes, and snippets.

View ric-bianchi's full-sized avatar
🔌
developing software to power science!

Riccardo M. BIANCHI, PhD ric-bianchi

🔌
developing software to power science!
View GitHub Profile
@ric-bianchi
ric-bianchi / install-gcc-centos7.sh
Created August 4, 2020 16:15
Install a modern GCC on Centos 7. Tested with GCC 9.
# By default, only GCC 4.8 is installed with devtools on Centos7.
# So here we will install a recent version of GCC.
# Source: https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/
# 1. Install the SCL.
sudo yum install centos-release-scl
# 2. See what versions are available.
sudo yum search devtoolset
@ric-bianchi
ric-bianchi / install-qt5-from-sources-centos7.sh
Last active September 24, 2023 03:20
Install the latest Qt5 (at the time of writing) from sources on Linux. Compiling Qt5 on Centos7 was not straightforward at all: without the right configuration flags, and the related packages installed, the `xcb` plugins was not built at all and all applications based on Qt5 crash with an error of the type `qt.qpa.plugin: Could not find the Qt p…
# Requirements:
# - Make sure you have a recent GCC compiler supporting, at least, C++11
# install dependencies
sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel libxkbcommon-devel libxkbcommon-x11-devel
sudo yum install xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel
# install MESA libs if you don't have NVidia drivers installed
#sudo yum install mesa-libGL-devel
# get the code and extract
@ric-bianchi
ric-bianchi / install-git-from-sources-centos7.sh
Created August 4, 2020 14:10
Download the latest Git and build it. Useful to install a recent Git version on Centos7. Tested.
#!/usr/bin/env bash
#
# The script downloads the latest Git version (at the time of writing),
# it builds it, and it installs the executables under `/usr/local/bin`.
#
# Aug 2020, Riccardo Maria Bianchi
#
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.28.0.tar.gz
tar -xvf git-2.28.0.tar.gz
cd cd git-2.28.0/
@ric-bianchi
ric-bianchi / install-fish-shell-centos7.sh
Last active August 10, 2020 12:02
Install the latest version (at the time of writing) of the Fish shell + Powerline + Powerline fonts on Centos7
# Download the latest (at the time of writing) source of Fish, build, and install
wget https://github.com/fish-shell/fish-shell/releases/download/3.1.2/fish-3.1.2.tar.gz
tar -xvf fish-3.1.2.tar.gz
cd fish-3.1.2
camke .
make -j
sudo make install
# install Powerline, for an enanched Fish prompt
sudo yum install python-pip
@ric-bianchi
ric-bianchi / install-tmux-centos7.sh
Last active October 14, 2021 09:11 — forked from pokev25/install-tmux.sh
Install the latest tmux (3.1b at the time of writing) on Centos 7
# Install tmux 3.1b on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
tar -xf libevent-2.1.12-stable.tar.gz
cd libevent-2.1.12-stable
./configure --prefix=/usr/local
@ric-bianchi
ric-bianchi / IDETextKeyBindingSet.Ric.plist
Last active April 3, 2020 17:16
Riccardo's customized Xcode keyboard shortcuts
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Cancellation</key>
<dict>
<key>Cancel</key>
<string>cancelOperation:</string>
</dict>
<key>Transformations</key>
@ric-bianchi
ric-bianchi / 01-mac-profiling.md
Created May 29, 2019 09:00 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity: