Skip to content

Instantly share code, notes, and snippets.

View AhiyaHiya's full-sized avatar

Jaime AhiyaHiya

View GitHub Profile
@AhiyaHiya
AhiyaHiya / sublime-keystroke-xcode-settings.txt
Last active October 28, 2016 04:53
Sublime keystroke settings to have the same mappings as Xcode
[
{ "keys": ["super+shift+["], "command": "prev_view" },
{ "keys": ["super+shift+]"], "command": "next_view" },
{ "keys": ["super+alt+left"], "command": "fold" },
{ "keys": ["super+alt+right"], "command": "unfold" },
{ "keys": ["super+alt+["], "command": "swap_line_up" },
{ "keys": ["super+alt+]"], "command": "swap_line_down" },
@AhiyaHiya
AhiyaHiya / .clang-format-cpp
Last active October 20, 2025 19:08
The clang-format file I use on my C++ files.
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlinesLeft: false
AlignOperands: true
@AhiyaHiya
AhiyaHiya / ConvertCVMatToWin32BMP.cpp
Last active February 6, 2022 21:56
Function to convert cv::Mat to Win32 HBITMAP aka BMP; function to paste HBITMAP to Windows clipboard.
#include <cassert>
#include "opencv2/opencv.hpp"
auto ConvertCVMatToBMP (cv::Mat frame) -> HBITMAP
{
auto convertOpenCVBitDepthToBits = [](const int32_t value)
{
auto regular = 0u;
@AhiyaHiya
AhiyaHiya / Makefile.osx
Last active December 14, 2015 15:09
FreeImage Makefile for Mac OS X. The original file came from https://gist.github.com/joonyou/1595931 , but I modified the file to work with the 10.10 SDK located within Xcode 6.3.2 running on Mac OS X 10.10
# -*- Makefile -*-
# Mac OSX makefile for FreeImage
# This file can be generated by ./gensrclist.sh
include Makefile.srcs
# General configuration variables:
CC_X86_64 = clang
CPP_X86_64 = clang++
COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS -D__ANSI__ -DDISABLE_PERF_MEASUREMENT