Skip to content

Instantly share code, notes, and snippets.

View christianmalek's full-sized avatar

Christian Malek christianmalek

View GitHub Profile
@mbinna
mbinna / effective_modern_cmake.md
Last active November 13, 2024 23:24
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@fetttobse
fetttobse / how_to_git.md
Created July 1, 2017 14:21
How to git in agile projects

How to Git

A Git workflow for agile development.

Step 1: Pull from master

First pull from master, to have the latest version of the repo: git pull origin master

Step 2: Checkout a feature branch

Checkout a feature branch, name it with the issue id of the story you are working on and a short description. For example if you are working on #42: User can upload pictures, do something like

@peterhurford
peterhurford / git-101-exercises.md
Last active July 29, 2023 04:30
Git 101, with Exercises

Git 101, with Exercises

Git is the key tool we use to allow multiple people to work on the same code base. Git takes care of merging everyone's contributions smoothly. Hence, learning how to use Git is critical to contributing to open source.

Exercises

Exercise 1: Go through the Try Git Guide

Exercise 2: Learn How to file a github issue.

@Nerdmind
Nerdmind / php-eine-einfuehrung-in-pdo-und-prepared-statements.md
Created February 13, 2016 03:05
PHP: Eine Einführung in PDO und Prepared Statements

Die PDO-Klasse ist eine tolle Klasse um Datenbankabfragen gleich viel sicherer zu machen. Wer bisher nur die prozedurale MySQL-Funktion oder objektorientierte MySQLi-Klasse verwendet hat, der muss sich ein kleines bisschen umstellen. PDO hört sich aber komplizierter an als es ist. Ich versuche hier nun mal die PDO-Klasse so gut es geht verständlich zu erklären. PDO ist die Profi-Klasse für sichere Datenbankabfragen. Mit PDO kann man wie mit den anderen beiden Funktionen auf herkömmliche Weise Datenbankabfragen an einen SQL-Server schicken. Der Unterschied ist nur die Syntax des Codes. Damit die Datenbankabfragen auch wirklich sicher und vor SQL-Injections geschützt sind, reicht es nicht aus, die normale query()-Methode zu benutzen. Diese eignet sich hervorragend für Abfragen, bei denen keine fremden Eingaben in die Abfrage geschrieben werden. Für Abfragen mit fremden Inhalten sollte immer die prepare()-Methode verwendet werden.

PDO-Verbindung zum SQL-Server herstellen

Bevor wir Abfragen an den Dat

@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active October 23, 2024 13:16
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@imjasonh
imjasonh / markdown.css
Last active November 6, 2024 14:26
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@mujimu
mujimu / d3-libraries-tutorials
Last active December 29, 2016 07:25
D3.js Libraries, Lessons and Tutorials
D3 - Data Driven Documents
http://d3js.org/
low level library to display/manipulate data in HTML/CSS & SVG
API Ref: https://github.com/mbostock/d3/wiki/API-Reference
D3 Plus - D3 Extension plugin
https://github.com/alexandersimoes/d3plus
Fabric - HTML5 Canvas library
http://fabricjs.com/
@sebmarkbage
sebmarkbage / ReactCanvasDrawing.js
Created July 25, 2014 19:14
Canvas Drawing Example
/** @jsx React.DOM */
var Graphic = React.createClass({
componentDidMount: function() {
var context = this.getDOMNode().getContext('2d');
this.paint(context);
},
componentDidUpdate: function() {
@basham
basham / css-units-best-practices.md
Last active October 9, 2024 20:03
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units