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
-------------------------------------------------------------------------------- | |
CHANGING SYSTEM STATES | |
-------------------------------------------------------------------------------- | |
systemctl reboot # Reboot the system (reboot.target) | |
systemctl poweroff # Power off the system (poweroff.target) | |
systemctl emergency # Put in emergency mode (emergency.target) | |
systemctl default # Back to default target (multi-user.target | |
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
/* | |
* Build command: | |
* g++ -o opencvni opencvni.cpp `pkg-config --cflags --libs opencv` | |
*/ | |
#include "opencv2/videoio/videoio.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
#include <iostream> |
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
""" | |
Educational code snippet for testing pointers familiarity. | |
Guess the output and find the bad practice. | |
""" | |
class Cat: | |
def __init__(self, s): | |
self.state = s | |
def observe(cats): |
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
# Note 1: change the grep cpp to filter an other extension | |
# Note 2: only "total lines" is relevant. | |
IFS=$'\n'; for ppl in $(git log --format='%aN' | sort -u); do echo $ppl; git log --author="$ppl" --pretty=tformat: --numstat | grep cpp | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines: %s total lines: %s\n",add,subs,loc }'; done |