Skip to content

Instantly share code, notes, and snippets.

View jacmoe's full-sized avatar

Jacob Moena jacmoe

View GitHub Profile
@jacmoe
jacmoe / qutebrowser_remap.py
Created February 27, 2023 09:54 — forked from tim-tx/qutebrowser_remap.py
Remap qutebrowser default keybindings to colemak
qwerty_to_colemak = {
'Q': 'Q',
'W': 'W',
'E': 'F',
'R': 'P',
'T': 'G',
'Y': 'J',
'U': 'L',
'I': 'U',
'O': 'Y',
@jacmoe
jacmoe / init.el
Created February 3, 2023 00:02 — forked from cpbotha/init.el
;; minimal version of my Emacs setup which approximates the effective points per inch on your screen
;; and then selects your default font pts based on that
;; Also works on wayland / WSLg because it parses out physical dims from weston.log (necessary in 2023-01)
;; LIMITATION: Will probably not work on multi-monitor setups. Exercise for the reader!
;; BSD 3-clause copyright Charl P. Botha <info@charlbotha.com>
(defun get-mon-attr (which)
(cdr (assoc which (car (display-monitor-attributes-list)))))
(defun get-monitor-width-mm ()
@jacmoe
jacmoe / SlidingConsole.cpp
Created January 28, 2021 22:54 — forked from Kojirion/SlidingConsole.cpp
Animating movement between two points with Thor - a SFML extension
#include <SFML/Graphics.hpp>
#include <Thor/Animations.hpp>
#include <Thor/Input.hpp>
#include <SFGUI/SFGUI.hpp>
#include <SFGUI/Widgets.hpp>
template <class Item>
void SetPosition(Item&, const sf::Vector2f&);
template <>
@jacmoe
jacmoe / CMakeLists.txt
Created December 23, 2020 21:10 — forked from squeek502/CMakeLists.txt
Lua 5.3.x Windows CMake build script
project ( lua C )
cmake_minimum_required ( VERSION 2.8 )
include_directories ( src ${CMAKE_CURRENT_BINARY_DIR} )
set ( SRC_CORE src/lapi.c src/lcode.c src/lctype.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c src/llex.c
src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c src/lstate.c src/lstring.c src/ltable.c
src/ltm.c src/lundump.c src/lvm.c src/lzio.c )
set ( SRC_LIB src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcorolib.c src/ldblib.c src/liolib.c
src/lmathlib.c src/loslib.c src/lstrlib.c src/ltablib.c src/lutf8lib.c src/loadlib.c src/linit.c )
@jacmoe
jacmoe / README.md
Created September 19, 2017 04:55 — forked from markusfisch/README.md
bash script to build a texture atlas with a little help from ImageMagick

mkatlas

[BASH][1] script to build a [texture atlas][2] for small/medium web sites/games. Requires [ImageMagick][3].

Usage

Basic

@jacmoe
jacmoe / quotesOnCurses.py
Created June 20, 2017 04:50 — forked from vcidst/quotesOnCurses.py
Structure of a curses application by [Sean Zicari](https://www.youtube.com/watch?v=eN1eZtjLEnU)
# This gist is transcribed from a talk by Sean Zicari
# Talk: Use Curses, don't swear https://www.youtube.com/watch?v=eN1eZtjLEnU
#
# I haven't written the function which he used to fetch quotes from the web
# This only presents the barebones structure of his application
#
# If debugging a curses application messes up your terminal, type `tset` to reset terminal
import curses
.MODEL large
.DATA
yincrement dd 0
.DATA?
wwidth dw ?
lightindex dd ?
rownum dw ?
colnum dw ?
xincrement dd ?
these are all my text strings at the moment.
i store them like this per language:
wchar_t* g_danish_strings[] = {
[TEXT_STRING_NAME_OF_LANG] = L"Dansk",
[TEXT_STRING_NEW_GAME] = L"Nyt Spil",
[TEXT_STRING_QUIT] = L"Afslut",
[TEXT_STRING_OPTIONS] = L"Valgmuligheder",
[TEXT_STRING_HOST] = L"Nyt Spil",
[TEXT_STRING_JOIN] = L"Tilslut Spil",
var reducePath = function (x, y, entryOffset, rangeOffset, entryRequiredWall, entryDisallowedWall) {
var rangeEntryRequiredDirections = [entryDisallowedWall, OppositeDirections[entryDisallowedWall]];
var rangeEntryDisallowedDirections = [entryRequiredWall, OppositeDirections[entryRequiredWall]];
var endDisallowedDirections = [OppositeDirections[entryRequiredWall], OppositeDirections[entryDisallowedWall]];
var endRequiredDirections = [entryRequiredWall, entryDisallowedWall];
var tile = tiles[x][y];
var color = tile.color;
var entry = tiles[x+entryOffset[0]][y+entryOffset[1]];

Keybase proof

I hereby claim:

  • I am jacmoe on github.
  • I am jacmoe (https://keybase.io/jacmoe) on keybase.
  • I have a public key whose fingerprint is 70AE E978 D8EE 0344 38AF 3CB2 3FA5 87E7 6502 3E60

To claim this, I am signing this object: