This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-eval-after-load 'projectile | |
(defconst fn/project-file ".project.el" | |
"Project configuration file") | |
(defconst fn/project-local-file ".project-locals.el" | |
"Project local setting file") | |
(defconst fn/project-init-files (list fn/project-file fn/project-local-file) | |
"Project init files") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcustom fn/w3m-video-executable "vlc" | |
"The executable that can run a network video stream.") | |
(defcustom fn/w3m-video-args | |
(list | |
;; This skews how the process is managed for vlc | |
;; "--one-instance" | |
;; "--play-and-exit" | |
) | |
"Extra arguments to run `fn/w3m-video-executable'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate log; | |
use std::{ | |
cell::{RefCell, UnsafeCell}, | |
sync::atomic::{AtomicU8, Ordering}, | |
}; | |
thread_local! { | |
static THREAD_ID: RefCell<u8> = RefCell::new(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(test)] | |
#[macro_use(quickcheck)] | |
extern crate quickcheck_macros; | |
pub fn median<I: Ord + std::fmt::Debug>(items: &mut Vec<I>, index: usize) -> I { | |
assert!(index < items.len()); | |
items.sort_unstable(); | |
items.remove(index) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
use std::ops::{Deref, DerefMut}; | |
#[derive(Debug)] | |
struct DB; | |
#[derive(Debug)] | |
struct Index(Vec<u8>); | |
#[derive(Debug)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-eval-after-load 'w3m | |
(require 'cl nil t) | |
(require 'cl-compat nil t) | |
(when (and (executable-find "polipo") | |
(executable-find "tor")) | |
(defcustom fn/w3m-polipo-cache-dir (expand-file-name "polipo-cache" user-emacs-directory) | |
"Polipo cache directory." | |
:type 'directory) | |
(defcustom fn/w3m-tor-cache-dir (expand-file-name "tor-cache" user-emacs-directory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst fn/haskell-file-extension ".hs" | |
"The de facto haskell file extension.") | |
(defun fn/add-haskell-file-extension (name) | |
"Add the extension of .hs to a file or buffer NAME." | |
(if (string/ends-with name fn/haskell-file-extension) | |
name (concat name fn/haskell-file-extension))) | |
(defvar fn/org-haskell-mode-hook nil | |
"Hook when buffer is haskellized.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar prodigy-dependency-services nil | |
"An alist of the service name and some properties that aid in | |
managing service dependency.") | |
(defvar prodigy-dependency-service-status-change-hook nil | |
"A hook for listening in service status changes.") | |
(defconst prodigy-dependency-condition-prefix "prodigy-dependency-condition" | |
"A symbol prefix for easier debugging.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"uuid":"2b441316-6ecd-4cb5-b6ed-43f94dbe1c12","update":{"status":"enqueued","updateId":5,"meta":"ClearDocuments","enqueuedAt":"2023-01-17T09:04:42.802887774Z"}} | |
{"uuid":"dcf86d48-0ebf-4a43-95e6-4ab43af30266","update":{"status":"enqueued","updateId":9,"meta":"ClearDocuments","enqueuedAt":"2023-01-17T09:04:44.131021383Z"}} | |
{"uuid":"2b441316-6ecd-4cb5-b6ed-43f94dbe1c12","update":{"status":"enqueued","updateId":6,"meta":"ClearDocuments","enqueuedAt":"2023-01-17T09:04:44.885871244Z"}} | |
{"uuid":"2b441316-6ecd-4cb5-b6ed-43f94dbe1c12","update":{"status":"enqueued","updateId":7,"meta":{"DocumentAddition":{"primary_key":null,"method":"ReplaceDocuments","content_uuid":"f29774f0-2951-427a-9e8f-87dc33485dc2"}},"enqueuedAt":"2023-01-17T09:04:52.141635220Z"}} | |
{"uuid":"75fd9fdd-b2ba-49ca-8e3e-83e6259dce0c","update":{"status":"enqueued","updateId":10,"meta":{"DocumentAddition":{"primary_key":null,"method":"ReplaceDocuments","content_uuid":"ebdc24a9-fe4d-4bed-a3ee-54de2717357f"}},"enqueuedAt":"2023-01-17T09:04:52.455155266Z"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use diesel::{ | |
pg::PgConnection, | |
r2d2::{ConnectionManager, Error as DieselPoolError}, | |
result::ConnectionError, | |
}; | |
use r2d2::{CustomizeConnection, Pool}; | |
#[derive(Debug)] | |
struct TestConnection; |
OlderNewer