Skip to content

Instantly share code, notes, and snippets.

View approximate's full-sized avatar

Konstantin approximate

View GitHub Profile
@juanje
juanje / gist:3797297
Created September 28, 2012 00:38
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@nicolevanderhoeven
nicolevanderhoeven / returnStudyOptions.js
Created January 14, 2022 11:16
Script for use with the Obsidian Dataview and Templater plugins to return activity options given an amount of time available
/*
This script returns a list of activity options you could do (each defined by a Markdown file),
depending on how much time you have available.
REQUIRES:
- Obsidian: https://obsidian.md
- Obsidian Dataview plugin: https://blacksmithgu.github.io/obsidian-dataview/
- Obsidian Templater plugin: https://silentvoid13.github.io/Templater/
- this folder structure: