Skip to content

Instantly share code, notes, and snippets.

@bjinwright
bjinwright / .env
Last active March 25, 2022 20:20
Django Settings using Environment Variables via envs (https://github.com/bjinwright/envs) project.
DATABASE_ENGINE=django.db.backends.sqlite3
DATABASE_NAME=db.sqlite3
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=
SECRET_KEY="asdfdfadsflkjsdflkjadsflkasfakl;"
STATIC_URL=/static/
DEBUG=True
@tzmartin
tzmartin / embedded-file-viewer.md
Last active June 15, 2024 19:32
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@jasonwash
jasonwash / make_csv.sh
Created March 5, 2014 18:45
Shell script to create a CSV file from a MongoDB collection. The CSV file will contain all possible top-level keys. Embedded documents are not handled.
#!/bin/bash
function usage {
printf "Usage:\n$0 <db_name> <collection_name> <output_csv_file>\n"
exit 1
}
db_name=$1
collection=$2
output_file=$3
@ifkas
ifkas / HTML5: Starting Template Snippet
Last active November 5, 2020 18:22
HTML5 snippet - Starter template for Sublime Text 3
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<!-- Global Metas -->