Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Example of a constant being modified | |
// clang++ -Wall -std=c++17 -O2 -o modify_const modify_const.cpp | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
unsigned long long hex_to_dec(std::string str) | |
{ | |
unsigned long long result = 0; |
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 | |
# Fix file permissions after setting up remote development with CLion | |
# Run this in the root of your project folder | |
dir=$(pwd) | |
for f in $(rg -l "\#!") | |
do | |
echo "$f" | |
cd $(dirname "$f") |
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
# My own Dockerfile for building arangodb using gcc-11.2 | |
# docker run -it -v /local/path/to/arangodb:/arangodb gcc-11.2 /bin/bash | |
FROM gcc:11.2.0 | |
WORKDIR /arangodb | |
RUN apt-get -y update && apt-get install -y build-essential libssl-dev libjemalloc-dev python libldap2-dev ripgrep | |
RUN wget https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-Linux-x86_64.sh \ | |
-q -O /tmp/cmake-install.sh \ | |
&& chmod u+x /tmp/cmake-install.sh \ | |
&& mkdir /usr/bin/cmake \ |
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 | |
# create build directory | |
mkdir -p build | |
# run cmake | |
(cd build && cmake \ | |
-DCMAKE_CXX_COMPILER="clang++" \ | |
-DCMAKE_C_COMPILER="clang" \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
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 | |
if [ $# -eq 0 ]; then | |
proc="$(ps aux | grep arangod | grep -v grep)" | |
else | |
proc="$(ps aux | grep arangod | grep -v grep | grep $1)" | |
fi | |
echo "$proc" > ps.txt |
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
# Script for parsing mealplans and generating a shopping list | |
# python mealplan.py mealplan.txt > list.txt | |
import sys | |
import re | |
def get_lines(file): | |
names = ['Alex', 'Lucia'] |
OlderNewer