Skip to content

Instantly share code, notes, and snippets.

@rnschmidt
rnschmidt / IRR.js
Created December 7, 2021 14:35 — forked from ghalimi/IRR.js
IRR Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
// Some algorithms have been ported from Apache OpenOffice:
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@rnschmidt
rnschmidt / create_db_restore.sh
Created August 20, 2020 13:12 — forked from bennylope/create_db_restore.sh
Create a named database and restore from the lastest downloaded file
#!/usr/bin/env bash
LATEST_DB="$HOME/Downloads/$(ls -t ~/Downloads | head -1)"
BACKUP_PATH=${2-$LATEST_DB}
DB=$1
echo "Creating database name $DB from $BACKUP_PATH"
psql -c "CREATE DATABASE $DB;"
# https://gist.github.com/1035190
# See also: Snippets 85, 240, 880 at http://www.djangosnippets.org/
#
# Minimally, the following settings are required:
#
# SSL_ENABLED = True
# SSL_URLS = (
# r'^/some/pattern/',
# )