Skip to content

Instantly share code, notes, and snippets.

View mlgarchery's full-sized avatar
🧙‍♂️
Building mammouth.ai

Martial Garchery mlgarchery

🧙‍♂️
Building mammouth.ai
View GitHub Profile
@niw
niw / Vagrantfile
Last active October 28, 2024 22:36
A simple Vagrantfile to setup Ubuntu desktop environment with Google Chrome and Japanese input
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider :virtualbox do |v|
v.gui = true
v.memory = 2048
end
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"`
# to make synced folder works.
@jakewtaylor
jakewtaylor / readme.md
Last active January 6, 2024 23:29
VS Code CSS addition to increase readability on file tree.

Increases indentation on the file tree and adds some lines to each directory/file.

Works 15 levels deep, but you can expand it by just adding more of each line thats repeating, i.e.:

  • add another box shadow
    • (n*-20px) 0 0 0 rgba(255, 255, 255, 0.4)
  • add another padding-left
    • .monaco-tree-row[aria-level="n"] { padding-left: ((n-1)*20)px; }
  • add another :before & :after with left positioning
    • .monaco-tree-row[aria-level="n"]:before { left: (((n-1)*20)-9)px; }
  • .monaco-tree-row[aria-level="n"]:after { left: (((n-1)*20)-9)px; }
@josephmosby
josephmosby / mongo-django.py
Created March 25, 2015 15:03
Architecture for declaring a global MongoDB MongoClient in Django
#project/project/__init__.py
import project.settings
import pymongo
THE_MONGO_CLIENT = pymongo.MongoClient(settings.MONGO_HOST, settings.MONGO_PORT)
#project/project/settings.py
INSTALLED_APPS += 'utils'
MONGO_HOST = 'localhost' #default