Skip to content

Instantly share code, notes, and snippets.

View d12frosted's full-sized avatar
⚠️
war time

Boris Buliga d12frosted

⚠️
war time
View GitHub Profile
(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
@d12frosted
d12frosted / MarIO.lua
Created June 15, 2015 08:14
MarI/O by SethBling
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
"B",
"X",
@d12frosted
d12frosted / Tuto.md
Created October 10, 2016 12:40 — forked from yogsototh/Tuto.md
Starting Emacs in GUI with shell environment variables correctly set

Problem

When starting Emacs.app on Mac, the Emacs doesn't have some environment variable set correctly. Typically it is terrible when you use GPG, pinentry-mac, gpg-agent But also a lot of different variables used to make git works correctly, etc...

Solution

  1. Create the file ~/bin/init-app-env.sh:
(defun +org-notes-tags-read ()
"Return list of tags as set in the buffer."
(org-roam--extract-tags-prop (buffer-file-name (buffer-base-buffer))))
(defun +org-notes-tags-delete ()
"Delete a tag from current note."
(interactive)
(unless (+org-notes-buffer-p)
(user-error "Current buffer is not a note"))
(let* ((tags (+org-notes-tags-read))
12345lovehate
Elvira4.54.54.54.04.514
Vasyl4.74.04.83.94.734
Bohdan4.74.24.53.84.614
Maks4.64.24.84.04.614
Boris4.44.04.53.84.314
Total22.920.923.119.522.7
Mean4.584.184.623.94.54
#!/usr/bin/env bash
set -e
ACTION=$1
emacs_d=$HOME/.config/emacs
if [[ -d "$XDG_CONFIG_HOME" ]]; then
emacs_d="$XDG_CONFIG_HOME/emacs"
fi
@d12frosted
d12frosted / migrate_git
Created July 8, 2020 11:59
quick code migration from one repository to another
#!/usr/bin/env bash
#
# Requirements:
#
# 1. git >= 2.25
# 2. git-filter-repo
# 3. bash >= 4.0
#
# Installation:
commit 23236f26d2f5839f2fdb7022039dcf102dcf3a3b
Author: Dhruva Krishnamurthy <address@hidden>
Date: Mon Dec 23 14:49:51 2019 -0800
Initialize ImageMagick runtime environment before use
diff --git a/src/image.c b/src/image.c
index 70d932f9ed..50d90ccb55 100644
--- a/src/image.c
+++ b/src/image.c
From 95160c34b4f41e867761f29239db02e8e7232bbe Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Mon, 29 Oct 2018 15:37:35 +0000
Subject: [PATCH] Fix more drawing bugs in NS port (bug#32932)
* src/nsterm.m (ns_row_rect): New function.
(ns_clip_to_row): Remove function.
(ns_copy_bits): Fix mistake.
(ns_draw_fringe_bitmap): Stop using ns_clip_to_row.
(ns_draw_window_cursor): Stop using ns_clip_to_row and move