Skip to content

Instantly share code, notes, and snippets.

View JamesMenetrey's full-sized avatar
🐹
Shifting some bits ...

Jämes Ménétrey JamesMenetrey

🐹
Shifting some bits ...
View GitHub Profile
@JamesMenetrey
JamesMenetrey / glut_shapes.c
Created March 28, 2017 21:04
GLUT - Shapes generation source
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/**
(c) Copyright 1993, Silicon Graphics, Inc.
ALL RIGHTS RESERVED
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
@JamesMenetrey
JamesMenetrey / zsh-commands-reminder
Created October 21, 2016 18:44
Zsh commands reminder
# Zsh commands reminder
## Create an alias for a directory
```
hash -d name=~path
```
## Sources
@JamesMenetrey
JamesMenetrey / git-real-world-commands.md
Last active April 22, 2020 12:26
git real world commands

git real world commands

Checking out

Review unstaged changes

git add -p
@JamesMenetrey
JamesMenetrey / copy-and-swap-idiom.cpp
Created May 8, 2016 22:05
C/C++ - The perfect Copy-And-Swap idiom usage
// Source: http://codereview.stackexchange.com/questions/95464/is-the-copy-swap-idiom-implemented-here-correctly
class Array
{
int size;
int* data;
public:
Array(Array const& copy)
: size(copy.size)
, data(new int[size])