Skip to content

Instantly share code, notes, and snippets.

View kashimAstro's full-sized avatar
🔒
busy

Dario Longobardi kashimAstro

🔒
busy
View GitHub Profile
@lyandut
lyandut / 0_learn_json.cpp
Last active November 14, 2024 11:36
Some examples of nlohmann/json (JSON for Modern C++).
#include <iostream>
#include <cassert>
#include <iomanip>
#include <fstream>
#include "single_include/nlohmann/json.hpp"
using namespace std;
using json = nlohmann::json;
// add snippnets here.
- channel from ofLog
- padding from ofLog
- nanosThen from ofFpsCounter
- secsThen from ofFpsCounter
- _mutexBlocks from ofThread
- _threadRunning from ofThread
- threadBeingWaitedFor from ofThread
- prevValue from ofParameter::Value
- document from ofXml
- element from ofXml
- ofBuffer(const string &text) from ofBuffer
- void setReadOnly(bool readable=true) from ofFile
- void setReadOnly(bool readable=true) from ofDirectory
- ~ofThread() from ofThread
- Poco::Thread * getCurrentPocoThread() from ofThread
- Poco::Thread & getPocoThread() from ofThread
- const Poco::Thread & getPocoThread() from ofThread
- bool isMainThread() from ofThread
- ostream & operator<<(size_t n) from ofColor_
- istream & operator>>(size_t n) from ofColor_
- RLine(vector< char >::reverse_iterator _begin, vector< char >::reverse_iterator _end) to ofBuffer::RLine
- const string & operator*() to ofBuffer::RLine
- const string * operator->() to ofBuffer::RLine
- const string & asString() to ofBuffer::RLine
- ofBuffer::RLine & operator++() to ofBuffer::RLine
- ofBuffer::RLine operator++(int ) to ofBuffer::RLine
- bool operator!=(const ofBuffer::RLine &rhs) to ofBuffer::RLine
- bool operator==(const ofBuffer::RLine &rhs) to ofBuffer::RLine
- bool empty() to ofBuffer::RLine
- ofBuffer::RLine rbegin() to ofBuffer::Lines
@kylemcdonald
kylemcdonald / ofMatrix4x4-vs-glm.cpp
Created March 30, 2018 18:48
ofMatrix4x4 compared to glm::mat4.
#include "ofMain.h"
int main() {
// both initialize to identity matrix
cout << glm::mat4() << endl;
cout << ofMatrix4x4() << endl;
// both row-major (translation stored in mat[3][0,1,2])
glm::mat4 glmMat;
glmMat = glm::translate(glmMat, glm::vec3(1,2,3));
@jvcleave
jvcleave / Cross compiler for RPi, Jessie, openFrameworks 0.9
Last active October 25, 2016 15:31
Instructions for building a Jessie VM to cross-compile openFrameworks 0.9 applications for the Raspberry Pi 1 (arm6)
#ON THE RPI (if you haven't downloaded openFrameworks)
cd
curl -O http://192.237.185.151/versions/nightly/of_v20151008_linuxarmv6l_nightly.tar.gz
mkdir openFrameworks
tar vxfz of_v20151008_linuxarmv6l_nightly.tar.gz -C openFrameworks --strip-components 1
cd /home/pi/openFrameworks/scripts/linux/debian
sudo ./install_dependencies.sh
#INSTALL SMB WITH / ACCESS
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active November 4, 2024 04:45
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a