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
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]];
@jacmoe
jacmoe / donate-bitcoin.html
Created December 11, 2016 00:32 — forked from joar/donate-bitcoin.html
Quick and dirty bitcoin donation button, as seen on https://gobblin.se
<style>
.donate-button {
text-align: center;
}
.donate-button .bitcoin-address {
font-size: 1.5em;
}
</style>
<div class="donate-button">
@jacmoe
jacmoe / steps.md
Created April 7, 2016 22:38 — forked from fredRos/steps.md
Setup emacs with github markdown and pandoc offline rendering

Based on this blog.

This guide shows you how to setup emacs to render a README.md very similarly to how github will do it; except it also works offline. There are no dependencies that can't be easily installed via the package manager on ubuntu.

  1. Install emacs24, the markdown mode, and pandoc. You may need the packages emacs, emacs-goodies-el, and pandoc.
  2. Get a style sheet that resembles the github style from this gist and store it. I put it in ~/emacs.d/github-pandoc.css.