Skip to content

Instantly share code, notes, and snippets.

@stzr1123
stzr1123 / Dockerfile
Created November 13, 2019 12:38 — forked from noelbundick/Dockerfile
Consuming packages from a private Azure Pipelines Python artifact feed
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image
FROM python:3.6-alpine AS builder
ARG INDEX_URL
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL
COPY requirements.txt .
RUN pip install -U pip \
&& pip install --user -r requirements.txt
@stzr1123
stzr1123 / twoSum.scala
Created November 4, 2019 20:36
Interview type problems
import scala.annotation.tailrec
object ShittySolution {
// Given an array of integers, return indices of the two numbers such that they add up to a specific target.
//
// You may assume that each input would have exactly one solution, and you may not use the same element twice.
// https://leetcode.com/problems/two-sum/
// NB: More efficient solution would iterate once over the array and keep a Map of values and indicies
def twoSum(nums: Array[Int], target: Int): Array[Int] = {
@stzr1123
stzr1123 / .emacs
Last active November 30, 2017 19:29
emacs profile
;; global variables
(setq
create-lockfiles nil
scroll-error-top-bottom t
use-package-always-ensure t
make-backup-files nil)
;; This is to remove ugly toolbar
(custom-set-variables
'(tool-bar-mode nil))