erDiagram
ValidPaths {
int id PK
string path
string hash
int registrationTime
string deriver
int narSize
int ultimate
This file contains hidden or 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
| -- Rerun last command plugin | |
| -- Unlike the python, this removes the scrollback in the terminal | |
| local M = {} | |
| -- Store the last terminal buffer job id | |
| M.last_terminal_chan_id = nil | |
| -- Function to record terminal job id when terminal is opened | |
| local function record_terminal_id() | |
| local buf = vim.api.nvim_get_current_buf() |
This file contains hidden or 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
| #! /bin/python | |
| ''' | |
| TODO: | |
| * Add database insert. | |
| * Add binding for the tab button to switch to the next 'non held' entry field. | |
| * Add functionality to hold buttons. | |
| * Add escape key functionality. | |
| ''' | |
| from Tkinter import * |
This file contains hidden or 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
| FROM python:3-stretch | |
| COPY . /app | |
| WORKDIR /app | |
| RUN mkdir -p /tmp | |
| # install socat and ssh to talk to the host ssh-agent | |
| RUN apt-get update && apt-get install git socat openssh-client \ | |
| # create variable called SSH_AUTH_SOCK, ssh will use this automatically |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # exit on first failure | |
| set -e | |
| # uncomment to enable debug mode | |
| #set -x | |
| # The location this script is run from | |
| OG_DIR=$(pwd) | |
| # The directory that this script is in |
This file contains hidden or 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
| BEGIN; | |
| SET LOCAL "jwt.claims.whatever" to 'blake.foo@stuff.com'; | |
| SELECT the_name_of_your_function('yo-10'); | |
| COMMIt; |
This file contains hidden or 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
| PY_FILES := $(shell find . -name '*.py') | |
| venv: venv/bin/activate | |
| venv/bin/activate: requirements.txt | |
| test -d venv || python3 -m venv venv | |
| venv/bin/python -m ensurepip | |
| venv/bin/python -m pip install -r requirements.txt | |
| touch venv/bin/activate | |
| test: venv |
This file contains hidden or 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
| def move_thing(src_mod, dest_mod, find_str): | |
| import os | |
| import rope.base.project | |
| from rope.base import libutils | |
| from rope.refactor import move | |
| project = rope.base.project.Project(os.getcwd()) | |
| origin = libutils.path_to_resource(project, src_mod) | |
| destination = libutils.path_to_resource(project, dest_mod) |
This file contains hidden or 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 log::info; | |
| macro_rules! timeit { | |
| ($format_str:expr, $code:expr) => { | |
| { | |
| let start = Utc::now(); | |
| let out = $code; | |
| info!( | |
| $format_str, | |
| (Utc::now() - start).num_milliseconds() |
This file contains hidden or 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 core::fmt::Debug; | |
| fn quick_sort<T: Ord + Clone + Debug>(mut list: Vec<T>) -> Vec<T> { | |
| if list.len() < 2 { | |
| return list; | |
| } | |
| let pivot = list.pop().unwrap(); | |
| let mut left: Vec<T> = vec![]; |
NewerOlder