Skip to content

Instantly share code, notes, and snippets.

const images = require.context('../images')
const state = {
images: images.keys().map(function(name) {
return({
name: name,
path: images(name,true)
})
})
}
@gurix
gurix / used_ruby_versions.py
Created March 3, 2020 15:25
A script to determine what ruby versions for you use for different projects in a workspace.
#!/usr/bin/env python3
import glob, os, sys
from collections import Counter
# It is necessary to pass a directory in which we want to look for a ruby version.
if len(sys.argv) < 2:
sys.exit("usage: %s dir \n\n dir : Direcotry to look up for ruby version" % sys.argv[0])
# Validate the specified directory.
path_argument = sys.argv[1]