Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
/* | |
* Compile with -lxcb -lxcb-randr | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <xcb/xcb.h> | |
#include <xcb/randr.h> | |
int main() { |
// | |
// File: inotify-example.cpp | |
// Date: July 16, 2013 | |
// Author: Peter Krnjevic <[email protected]>, on the shoulders of many others | |
// | |
// This is a simple inotify sample program monitoring changes to "./tmp" directory (create ./tmp beforehand) | |
// Recursive monitoring of file and directory create and delete events is implemented, but | |
// monitoring pre-existing "./tmp" subfolders is not. | |
// A C++ class containing a couple of maps is used to simplify monitoring. | |
// The Watch class is minimally integrated, so as to leave the main inotify code |
# checkout, compile & install | |
git clone https://github.com/facebook/watchman.git | |
cd watchman/ | |
git checkout v4.9.0 | |
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool | |
./autogen.sh | |
./configure | |
make | |
sudo make install |
/** | |
* More info? | |
* [email protected] | |
* http://aspyct.org | |
* @aspyct (twitter) | |
* | |
* Hope it helps :) | |
*/ | |
#include <stdio.h> |
#ifndef _COMMON_H_ | |
#define _COMMON_H_ | |
#define SEM_KEY_FILE ("sem.key") | |
#endif /* _COMMON_H_ */ |
#include <condition_variable> | |
#include <mutex> | |
#include <future> | |
#include <iostream> | |
#include <chrono> | |
#include <queue> | |
bool isReady; | |
std::mutex mutex; | |
std::condition_variable condvar; |
/** | |
* \file stack_traces.c | |
* \brief | |
* | |
* Compile with: | |
* on linux: gcc -g stack_traces.c | |
* on OS X: gcc -g -fno-pie stack_traces.c | |
* on windows: gcc -g stack_traces.c -limagehlp | |
*/ |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
I have to be frank here, this is going to be | |
- criticism of thrust | |
- Showing off ArrayFire (of which I am a core developer) | |
*Criticism of thrust* | |
They do a good job at optimizing parallel algorithms for vector inputs. | |
They use data level parallelism (among other things) to parllelize algorithms that work really well for large, vector inputs. | |
But they fail to improve upon it and go all the way to perfom true data level parallelism. i.e. a large number of small problems. |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |