Skip to content

Instantly share code, notes, and snippets.

--[[
* Copyright (c) 2011-2016 - Ashita Development Team
*
* Ashita is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Ashita is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@graphitemaster
graphitemaster / T0.md
Last active May 6, 2024 10:18
Vulkan Tutorial

Tutorial 0

What is Vulkan

Vulkan is a low-overhead, cross-platform 3D graphics and compute API.

Vulkan targets

Vulkan targets high-performance realtime 3D graphics applications such as games and interactive media across multiple platforms providing higher performance and lower CPU usage.

@Flix01
Flix01 / imguitablabel.h
Last active October 12, 2021 22:36
A ImGui::TabLabels(...) that supports line wrapping, tab reordering through drag'n'drop and tab closing through MMB press.
#pragma once
#include <imgui.h>
// USAGE EXAMPLE
/*
ImGui::Text("Tabs (based on the code by krys-spectralpixel):");
static const char* tabNames[] = {"Render","Layers","Scene","World","Object","Constraints","Modifiers","Data","Material","Texture","Particle","Physics"};
static const int numTabs = sizeof(tabNames)/sizeof(tabNames[0]);
static const char* tabTooltips[numTabs] = {"Render Tab Tooltip","","","","Object Type Tooltip","","","","","Tired to add tooltips...",""};
static int tabItemOrdering[numTabs] = {0,1,2,3,4,5,6,7,8,9,10,11};
@ocornut
ocornut / (Archived) imgui_memory_editor.h
Last active August 28, 2024 05:01
Mini memory editor for dear imgui (to embed in your game/tools)
// Mini memory editor for Dear ImGui (to embed in your game/tools)
// Animated GIF: https://twitter.com/ocornut/status/894242704317530112
// THE MEMORY EDITOR CODE HAS MOVED TO GIT:
// https://github.com/ocornut/imgui_club/tree/master/imgui_memory_editor
// Click "Revisions" on the Gist to see old version.
@jalcine
jalcine / .gitignore
Last active August 8, 2024 07:32
Getting libuv and zeromq working together (polling setup)
build
@electronut
electronut / ldr.py
Created May 4, 2014 06:14
Display analog data from Arduino using Python (matplotlib animation)
"""
ldr.py
Display analog data from Arduino using Python (matplotlib)
Author: Mahesh Venkitachalam
Website: electronut.in
"""
import sys, serial, argparse
@electronut
electronut / showdata.py
Created May 24, 2013 07:44
Display analog data from Arduino using Python (matplotlib)
################################################################################
# showdata.py
#
# Display analog data from Arduino using Python (matplotlib)
#
# electronut.in
#
################################################################################
import sys, serial
@randrews
randrews / lua_map.c
Created April 23, 2011 22:16
Example of embedding Lua in C
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <stdlib.h>
int map_create(lua_State *lua);
int map_slice(lua_State *lua);
int main(int argc, char **argv){
lua_State *lua = lua_open();
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active November 2, 2024 12:56
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh