Skip to content

Instantly share code, notes, and snippets.

View alphapapa's full-sized avatar

Adam Porter alphapapa

  • USA
View GitHub Profile
@alphapapa
alphapapa / org-link-github.el
Last active January 22, 2024 23:38 — forked from stefanv/org-gh-links.el
GitHub links for org mode
@alphapapa
alphapapa / .dockerignore
Created July 9, 2021 11:08 — forked from jscheid/.dockerignore
Running makem in Docker
Dockerfile
/.sandbox/
/.git/
@alphapapa
alphapapa / README.md
Created January 5, 2021 03:17 — forked from thibaudcolas/README.md
Video Downloader professional kmdldgcmokdpmacblnehppgkjphcbpnn background.js

Video Downloader professional kmdldgcmokdpmacblnehppgkjphcbpnn background.js

This is the source of background.js for a now-unpublished Chrome extension called "Video Download professional" (ID kmdldgcmokdpmacblnehppgkjphcbpnn, since then replaced with another "Video Download professiona" (ID bacakpdjpomjaelpkpkabmedhkoongbi). This script is republished here for educational purposes. It has initially been extracted from the extension’s archive available as v2.4 on https://www.crx4chrome.com/.

Why is this interesting?

The extension has appeared in malware discussions in the past. Its replacement of Video downloader professional "bacakpdjpomjaelpkpkabmedhkoongbi" seems related to the ownership change of The Great Suspender.

What does t

@alphapapa
alphapapa / org-ql-rasmi.el
Created December 18, 2020 09:50 — forked from mskorzhinskiy/org-ql-rasmi.el
Current configuration for personal org queries
(setq
org-ql-views
'(("stuck" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (tags "story")
(not (tags "ignore"))
(not (done)) ;; Finished stories should be excluded
(not (descendants (todo "NEXT"))) ;; If there are already
@alphapapa
alphapapa / dll-fifo.el
Created January 1, 2019 01:39 — forked from jordonbiondo/dll-fifo.el
A fifo queue in emacs lisp using a cyclic doubly linked list.
;; FIFO queue implementation using cyclic doubly linked lists
;;
;; This data structure is a bit overkill for a queue,
;; but it has many other uses
;; a doubly linked list cell look like (val . (prev-cell next-cell))
;;
;; a FIFO queue object looks like ('fifo . cyclic-doubly-linked-list)
;;
;; An empty FIFO queue would be: ('fifo . nil)
@alphapapa
alphapapa / config.md
Created September 8, 2018 00:33 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@alphapapa
alphapapa / pp-debug.el
Created December 6, 2017 19:04 — forked from felipeochoa/pp-debug.el
Pretty print emacs debug frames
;;; pp-debug.el --- Pretty-print debug frames -*- lexical-binding: t -*-
;; Copyright (C) 2017 Felipe Ochoa
;; Author: Felipe Ochoa
;; Created: 5 Dec 2017
;; License: GPL
;;; Commentary:
;;; Pretty-print debugger frames.
;;; Neat convenience function for working with Elisp's EIEIO objects
(defmacro oref* (object &rest slots)
"Like `oref', but each slot in SLOTS is applied in sequence.
For example,
\(oref* obj :inner :property)
is equivalent to
@alphapapa
alphapapa / README.md
Created June 24, 2017 21:23 — forked from Fuco1/README.md
org-graph

Relations

Relations are maintained through the outline hierarchy and special properties on the entries so we can model arbitrary graphs instead of only DAGs. This means you can define parents or children completely outside the hierarchy or even in different files.

Relations are kept in sync bidirectionally so please only use the API to maintain them otherwise things might get lost. Because the relations are bidirectional the graph traversal and querying is extremly fast.

Parents

Parents are defined by the GRAPH_PARENTS property as list of IDs and implicitly through the org outline hierarchy: all headlines above this one are this entry's parents.

#!/usr/bin/env zsh
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@ens-cachan.org
# 2016-05-10 15:36:06 (UTC+0200)
format_duration()
{
diff=$1 # Duration in seconds
if test $diff -ge 86400; then