Skip to content

Instantly share code, notes, and snippets.

View jacmoe's full-sized avatar

Jacob Moena jacmoe

View GitHub Profile
@cpbotha
cpbotha / init.el
Last active February 6, 2023 10:45
;; 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 ()
@tim-tx
tim-tx / qutebrowser_remap.py
Created August 14, 2021 00:45
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',
@pianocomposer321
pianocomposer321 / colors.lua
Last active October 10, 2022 22:26
Feline.nvim config
-- ~/.config/nvim/lua/plugins/feline/colors.lua
-- One-dark colors
local _M = {
bg = '#2c323c',
fg = none,
yellow = '#e5c07b',
cyan = '#8abeb7',
darkblue = '#528bff',
green = '#98c379',
@ityonemo
ityonemo / test.md
Last active May 27, 2024 16:11
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@kylekatarnls
kylekatarnls / yii2-pug-php3
Created October 24, 2017 12:42
Pg-php 3 for Yii2 adapter
<?php
namespace rmrevin\yii\pug;
use Pug\Pug;
use Yii;
use yii\base\View;
use yii\helpers\FileHelper;
/**
@vcidst
vcidst / quotesOnCurses.py
Last active December 9, 2017 07:52
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
@squeek502
squeek502 / CMakeLists.txt
Last active October 13, 2022 14:16
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 )
@sindresorhus
sindresorhus / TrueColour.md
Created January 17, 2017 11:46 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@Kojirion
Kojirion / SlidingConsole.cpp
Created July 30, 2016 09:47
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 <>
@shadowhand
shadowhand / .gitconfig
Created March 9, 2016 02:34
You just need a bigger hammer!
[alias]
fixlock = ! git reset HEAD -- composer.lock && git co -- composer.lock && composer update --no-scripts && git add composer.lock