Skip to content

Instantly share code, notes, and snippets.

@DamnedScholar
DamnedScholar / npm-debug.log
Created November 8, 2017 23:05
Attempting to run Gatsby
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'dedupe' ]
2 info using npm@3.10.8
3 info using node@v7.0.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly dedupe normalizeTree
@DamnedScholar
DamnedScholar / webpack.config.js
Created December 31, 2020 20:16
Webpack for Stimulus
const webpack = require('webpack');
const glob = require('glob');
const TerserPlugin = require('terser-webpack-plugin')
let globOptions = {
ignore: ['node_modules/**', 'venv/**']
}
let entryFiles = glob.sync("**/javascript/*.js", globOptions)
@DamnedScholar
DamnedScholar / Pipfile
Created February 22, 2021 19:53
pipenv bug with importing requirements.txt
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
aioredis = "==1.3.1"
alembic = "==1.4.2"
amqp = "==2.6.0"
anyjson = "==0.3.3"
@DamnedScholar
DamnedScholar / dropbox.py
Created March 24, 2021 18:50
Supervisor class for Dropbox/OSFS integration with Django
# For relative imports to work in Python 3.6
import os, sys
from fs import copy; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import logging
logger = logging.getLogger('dropbox-fs')
from django.conf import settings
@DamnedScholar
DamnedScholar / mediabox.py
Created March 30, 2021 14:41
A class that silently syncs Dropbox -> MEDIA_ROOT, serves locally, and can be as fuzzy, random, or specific as you want to be.
# For relative imports to work in Python 3.6
import os, sys
import jinja2; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import logging
logger = logging.getLogger('dropbox-fs')
from random import choice, choices, sample