Skip to content

Instantly share code, notes, and snippets.

const axios = require('axios')
const childProcess = require('child_process')
const path = require('path')
module.exports = {openReviewGui, getDeckStats}
async function anki(method, url, dataObject){
// implemented using the ankiConnect plugin
// https://foosoft.net/projects/anki-connect/
// https://ankiweb.net/shared/info/2055492159
@dylan-sessler
dylan-sessler / anonymous-gist.sh
Created September 19, 2022 02:24
screen record
#!/bin/bash
less_noisy='-hide_banner -y -loglevel error'
screengrab_cmd='x11grab'
framerate=10
screen_resolution=$(xdpyinfo | awk '/dimensions:/ { print $2 }')
monitor_location=':0.0'
audio_input='default'
color_format='yuv420p'
quality_level='33' # default 23, higher worse, lower better. Common range is 18-33
@dylan-sessler
dylan-sessler / anonymous-gist.js
Created September 14, 2022 16:31
write tests evan
const db = require ('../../../db')
module.exports = async function supplierLeadTime(sourcingOption) {
const LOWER_LEAD_TIME_CONTRIBUTION_RATE = 0.2 // Maybe set this in the config table so it's easy for Evan to adjust?
const ptgsWithIsTool = sourcingOption.partGroups.map((ptg) => {
ptg.isTool = isTool(ptg)
return ptg
})
@dylan-sessler
dylan-sessler / anonymous-gist.
Created August 25, 2022 12:22
package set up
(progn
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(package-initialize)
) ;; Package.el setup
(progn
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(progn
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(require 'bind-key)
) ;; use-package setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Customizations set through customize-x workflow ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (sanityinc-tomorrow-night)))
'(custom-safe-themes
(global-set-key (kbd "C-M-h") 'help-command) ; needs to be in global - maybe for the rest of its bindings?
(global-set-key (kbd "C-M-h a") 'helm-apropos) ; much better apropro and needs to be linked to the same root as the help-command
-- ---------------------
-- /*
-- _
-- _ __ ___ __ _| |
-- | '_ \/ __|/ _` | |
-- | |_) \__ \ (_| | |
-- | .__/|___/\__, |_|
-- |_| |_|
-- ---------------------
\set e '\\echo '
#command
n forw-line
y back-line
N forw-scroll 5
Y back-scroll 5
j repeat-search
J reverse-search
### Copy Mode (Vim Style) ###
# vim keys in copy and choose mode
set-window-option -g mode-keys vi
# copying selection vim style
# http://jasonwryan.com/blog/2011/06/07/copy-and-paste-in-tmux/
# https://github.com/myfreeweb/dotfiles/blob/master/tmux.conf
bind-key -n M-k copy-mode # enter copy mode; default [
bind-key -T copy-mode-vi y send-keys -X cursor-up;