Skip to content

Instantly share code, notes, and snippets.

@vancouverwill
vancouverwill / pyproject.toml
Created January 8, 2020 17:30
broken Poetry package recipe
[tool.poetry]
name = "xxxxxxxxx"
version = "0.47.1"
description = "xxxxxxxx"
authors = ["xxxxxx"]
repository = "https://xxxxxxxxx/api/pypi/pypi-virtual/simple"
packages = [
{ include = "xxxmanager", from = "src" },
{ include = "xxxmodels", from = "src"}
@vancouverwill
vancouverwill / gist:490daeb4c7acec58af00396ae0f13702
Created May 14, 2019 18:27
pyproject.toml communitymodels
[tool.poetry]
name = "communitymodels"
version = "0.2.0"
description = ""
authors = ["Tim Cook <timcook@apple.com>"]
[tool.poetry.dependencies]
python = "^3.6"
jsonschema = "^3.0"
numpy = "^1.16"
[tool.poetry]
name = "evaluators"
version = "0.1.0"
description = "evaluator service to evaluate sync and async models for RED"
authors = ["Tim Cook <timcook@apple.com>"]
[tool.poetry.dependencies]
python = "^3.6"
communitymodels = {git = "git@privaterepo.co:private-repo-name.git", rev = "7196dd14be6a041b6ef3bc1fcad09a84456eaefd"}
flask = "^1.0"
@vancouverwill
vancouverwill / .vimrc
Last active June 30, 2018 10:12
Vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@vancouverwill
vancouverwill / tmux.conf
Last active May 30, 2018 22:19
tmux.conf
# to download tmux pluging manager run `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm`
# don't rename windows automatically
set-option -g allow-rename off
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
@vancouverwill
vancouverwill / commandLineApp.php
Created April 21, 2017 14:53
PHP simple commnd line implentation
<?php fwrite(STDOUT, 'Please enter Employee ID'.PHP_EOL);
// Read the input
$employee_id = fgets(STDIN);
fwrite(STDOUT, 'Employee ID : '.$employee_id.PHP_EOL.PHP_EOL);
fwrite(STDOUT, 'Please enter Employee auth V2 hash'.PHP_EOL);
$employee_hash = fgets(STDIN);
@vancouverwill
vancouverwill / tmux-cheatsheet.markdown
Created March 27, 2017 12:35 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vancouverwill
vancouverwill / nginx.conf
Created July 11, 2016 15:18
Sample SSL only NGINX config file
user nginx;
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
@vancouverwill
vancouverwill / nginx.conf
Last active July 11, 2016 14:52
Sample NGINX configuration for redirect proxy server
user nginx;
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
@vancouverwill
vancouverwill / gist:e412b2b2bd0069c950c0
Last active August 29, 2015 14:23
determine how far from the centre an index is given that the array has been rotated an unknown amount and we know the middleIndex
displacementFromMiddle = function(index, arraySize, middleIndex) {
if (index == middleIndex) return 0;
var imagesRadius = Math.floor(arraySize / 2)
var x = index - middleIndex;
var y;
if (x > imagesRadius) {
y = x - arraySize;