Git Snippets
Save changes in new branch
When you made some changes and want to store them in a new branch, and you did not yet commit your changes, you can execute the following. Make sure that you did not commit the changes yet.
$ git branch -b your_new_branch $ git commit -am "Changes in new branch!" $ git push origin your_new_branch
Make a local copy of a remote branch
When you have a new branch and you do a clone on another location you need to checkout the remote branch first, and make a local version of it.
$ git remote update ... * [new branch] feature_heightfield_fix -> origin/feature_heightfield_fix ... $ git checkout -b feature_heightfield_fix origin/feature_heightfield_fix
Push new branch to remote
Here roxlu is the new branch that we would like to push to origin.
$ git push -u origin roxlu
Clone a repository withouth all history
git clone --depth 1 --branch master git://git.gnome.org/glib .
Create a bare repository
You can use a bare repository to allow other users to push changes to your own server. To create a bare repository you use:
$ login git $ cd /Users/git/repositories $ mkdir roxlu.git $ cd roxlu.git $ git init --bare .
Then you can checkout this repository by something like:
$ cd Documents/programming/roxlu $ git clone git@localhost:/repositories/roxlu.git .
... or you can push an existing repository to the newly created bare git
$ cd existing/repository $ git remote add roxlu git@localhost:/repositories/roxlu.git # git push --all roxlu
NAT Types
Building Cabinets
Compiling GStreamer from source on Windows
Debugging CMake Issues
Dual Boot Arch Linux and Windows 10
Mindset Updated Edition, Carol S. Dweck (Book Notes)
How to setup a self-hosted Unifi NVR with Arch Linux
Blender 2.8 How to use Transparent Textures
Compiling FFmpeg with X264 on Windows 10 using MSVC
Blender 2.8 OpenGL Buffer Exporter
Blender 2.8 Baking lightmaps
Blender 2.8 Tips and Tricks
Setting up a Bluetooth Headset on Arch Linux
Compiling x264 on Windows with MSVC
C/C++ Snippets
Reading Chunks from a Buffer
Handy Bash Commands
Building a zero copy parser
Kalman Filter
Saving pixel data using libpng
Compile Apache, PHP and MySQL on Mac 10.10
Fast Pixel Transfers with Pixel Buffer Objects
High Resolution Timer function in C/C++
Rendering text with Pango, Cairo and Freetype
Fast OpenGL blur shader
Spherical Environment Mapping with OpenGL
Using OpenSSL with memory BIOs
Attributeless Vertex Shader with OpenGL
Circular Image Selector
Decoding H264 and YUV420P playback
Fast Fourier Transform
OpenGL Rim Shader
Rendering The Depth Buffer
Delaunay Triangulation
RapidXML
Git Snippets
Basic Shading With OpenGL
Open Source Libraries For Creative Coding
Bouncing particle effect
OpenGL Instanced Rendering
Mapping a texture on a disc
Download HTML page using CURL
Height Field Simulation on GPU
OpenCV
Some notes on OpenGL
Math
Gists to remember
Reverse SSH
Working Set
Consumer + Producer model with libuv
Parsing binary data
C++ file operation snippets
Importance of blur with image gradients
Real-time oil painting with openGL
x264 encoder
Generative helix with openGL
Mini test with vector field
Protractor gesture recognizer
Hair simulation
Some glitch screenshots
Working on video installation
Generative meshes
Converting video/audio using avconv
Auto start terminal app on mac
Export blender object to simple file format