Skip to content

Instantly share code, notes, and snippets.

# on hostA, the initial home of the repo
hostA$ git bundle create hostA.bundle --branches --tags
# transfer the bundle to hostB, and continue:
hostB$ git clone /path/to/hostA.bundle my-repo
# you now have a clone, complete with remote branches and tags
# just to make it a little more obvious, rename the remote:
hostB$ git remote rename origin hostA
# make some commits on hostB; time to transfer back to hostA
@ZenToad
ZenToad / rPrint example.txt
Created July 28, 2017 18:20 — forked from stuby/rPrint example.txt
This is a handy recursive data printer.
> rPrint({first={true,1.3,"abc",{1,2,5}},22,33,last={nil,5},2},nil,"Junk")
Junk table
Junk [1] number 22
Junk [2] number 33
Junk [3] number 2
Junk [last] table
Junk [last] [2] number 5
Junk [first] table
Junk [first] [1] boolean true
Junk [first] [2] number 1.3
@ZenToad
ZenToad / gameloop.cpp
Created March 23, 2018 22:50
Mortis game loop template
#define STB_TRUETYPE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#include "glm/glm/glm.hpp"
#include "glm/glm/ext.hpp"
#include "stb/stb_truetype.h"
#include "stb/stb_image.h"
#include "zen/sdlu.h"
@ZenToad
ZenToad / Install.bash
Created May 16, 2018 16:55 — forked from blachniet/Install.bash
Install pip packages in an offline environment
# 1. On a internet-connected device, download the package and its dependencies to a directory
mkdir pip-es-curator
pip install --ignore-installed -d ./pip-es-curator elasticsearch-curator
# 2. Move the directory containing the packages to the offline device
# 3. On the offline device, install the package from the transferred directory
pip install --no-index --find-links ./pip-es-curator elasticsearch-curator
@ZenToad
ZenToad / .vimrc
Created June 18, 2018 15:23
linux vimrc
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <[email protected]>
" Last change: 2011 Apr 15
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
@ZenToad
ZenToad / gist:be821aed213a14e0bc352fa5f13769ab
Last active June 20, 2018 18:05
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev gnome-devel canberra-gtk-module
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@ZenToad
ZenToad / .vimrc
Created September 24, 2018 20:59
My `.vimrc` file
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@ZenToad
ZenToad / .vimrc
Created November 27, 2018 17:31
2018 .vimrc RHEL7
silent !stty -ixon > /dev/null 2>/dev/null
" Here is the Vundle stuff
set nocompatible " be iMproved, required
filetype off " required
set path+=**
set wildmenu
let mapleader=","
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
@ZenToad
ZenToad / zen_alloc.c
Last active November 8, 2019 14:02
zen_alloc.h
#include "zen_alloc.h"
#include <stdlib.h>
#include <assert.h>
zen_allocator_i *zen_allocator_default;
typedef struct zen_alloc_default_t {
zen_allocator_i base;
uint32_t total_memory;
} zen_alloc_default_t;
@ZenToad
ZenToad / build.bat
Created November 8, 2019 14:05
build and test batch files
@echo off
setlocal enableextensions enabledelayedexpansion
set target=stretch_buffer_test
set target_c=%target%
set target_exe=%target%
set compiler=cl
set configuration=debug
set target_src=..\src\async.c
set target_include=-I..\include