Skip to content

Instantly share code, notes, and snippets.

View robgrzel's full-sized avatar

Robert Grzelka robgrzel

  • Sweden, Gotheborg
View GitHub Profile
We couldn’t find that file to show.
@robgrzel
robgrzel / External_GTest.cmake
Created August 1, 2017 18:04 — forked from ClintLiddick/External_GTest.cmake
CMake ExternalProject_Add for Google Mock (gmock) and Google Test (gtest) Libraries
find_package(Threads REQUIRED)
ExternalProject_Add(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
UPDATE_COMMAND ""
INSTALL_COMMAND ""
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
@robgrzel
robgrzel / tin093_as1_1.md
Created March 30, 2018 20:22
Welcome file

TIN093 Assignment 1

Danqing Li - 950121-C669 Robert Grzelka - 911009-T437

1.1. Complexity analysis of prime(n):

In the basic programming course (at least on Physics dept.) there has been a programming assignment where you generate all primes between 2..n. One simple way of doing it is to use Eratosthenes sieve:

  • create an array 2..n filled with “true” booleans.
@robgrzel
robgrzel / ubunbut_dafny_install.sh
Last active January 12, 2018 15:05
install dafny
#Dependencies: Install Mono from the official repositories;
#the version in most distribution repositories is too out of date.
#The mono-devel package is what you need.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get -y update
#Create an empty base directory
mkdir ~/.dafny
cd ~/.dafny
@robgrzel
robgrzel / vim lldb
Last active January 12, 2018 01:06
#Ubuntu LLDB for vim config
export _V_=3.8
echo $_V_
sudo apt install -y clang libclang-$_V_ libclang-dev \
liblldb-3.8 libllvm-3.8 python3-future python-lldb-$_V_ lldb-$_V_ && \
\
cd /usr/lib/llvm-$_V_/lib/python2.7/site-packages/lldb && \
sudo ln -sf ../../../liblldb.so.1 _lldb.so && \
@robgrzel
robgrzel / Rafi_vim-config_forking
Created January 9, 2018 03:48
Rafi/vim-config forking
git clone git://github.com/rafi/vim-config.git ~/.RafiVim
ln -sf ~/.RafiVim ~/.config/nvim
pip3 install --user --upgrade PyYAML
cd ~/.RafiVim
(./venv.sh)
make test
make
Hi @robgrzel , there are two files for user customization
~/.EverVim.vimrc is for global user config that will override the default
YOUR_PROJECT/.EverVim.project is for per-project settings that overrides the default and the global user config. You can just simply put this file in the project root directory.
As for user-defined keymappings, it's just how you normally define vim keymaps. You can add key mapping to one of those files above. For example
" in one of your project root
" .EverVim.project
nnoremap <Leader>mb :!cd build; cmake ..; make -j
@robgrzel
robgrzel / The Technical Interview Cheat Sheet.md
Created December 18, 2017 20:33 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.