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; |
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 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
#[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
#[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
(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
(cons "freenode" | |
(concat ;; freenode | |
(propertize | |
"free" 'face '(:foreground "#e6e6e6")) | |
(propertize | |
"node" 'face '(:foreground "#4beb4a")))) | |
(cons "emacs" | |
(propertize | |
"emacs" |
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
;;; projin.el --- Write projectile ignore files with a DSL -*- lexical-binding: t; -*- | |
;; | |
;; Filename: projin.el | |
;; Description: | |
;; Author: Francis Murillo | |
;; Maintainer: | |
;; Created: Wed Dec 28 21:36:00 2016 (+0800) | |
;; Version: 0.1 | |
;; Package-Requires: ((emacs "24.4")) | |
;; Last-Updated: |
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
;;; magin.el --- Write git ignore files with a DSL -*- lexical-binding: t; -*- | |
;; | |
;; Filename: magin.el | |
;; Description: | |
;; Author: Francis Murillo | |
;; Maintainer: | |
;; Created: Wed Dec 28 21:36:00 2016 (+0800) | |
;; Version: 0.1 | |
;; Package-Requires: ((emacs "24.4")) | |
;; Last-Updated: |
NewerOlder