This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install matplotlib astropy jplephem | |
from astropy import units as u | |
from astropy.time import Time | |
from astropy.coordinates import solar_system_ephemeris, get_body, EarthLocation, GeocentricTrueEcliptic | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Ensure astropy.units is correctly imported and used | |
initial_time = Time('2019-01-01 00:00:00', scale='utc') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this in the folder 'moonphase' at the top level directory to load | |
# https://example.com/moonphase/moonphase/02-03-2024.png | |
RewriteEngine On | |
# Check if mod_rewrite is enabled | |
<IfModule mod_rewrite.c> | |
# Rewrite only if the request is for a moon phase image | |
RewriteRule ^moonphase/([0-9]{2})-([0-9]{2})-([0-9]{4})\.png$ moonphase.php?month=$1&day=$2&year=$3 [L,QSA] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run on scene load.... | |
// Function to update and set up the checkbox | |
function setupAutoPlayToggle() { | |
var checkBox = document.getElementById('autoPlayToggle'); // Get the checkbox element | |
if (checkBox) { | |
var autoPlayEnabled = localStorage.getItem('autoPlayEnabled') === 'true'; // Check if auto play is enabled | |
checkBox.checked = autoPlayEnabled; // Set the checkbox state based on the auto play status | |
checkBox.addEventListener('change', function() { // Add event listener for checkbox change | |
localStorage.setItem('autoPlayEnabled', this.checked); // Update the auto play status in local storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start with brew install fontforge | |
import fontforge | |
import os | |
import re | |
def sanitize_filename(name): | |
"""Sanitize the glyph name to be safe for filenames.""" | |
return re.sub(r'[\\/*?:"<>|]', '_', name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$upload_mb = upload_mb(); | |
/** | |
* Calculate the maximum file upload size | |
* | |
* @return string Formatted size string | |
*/ | |
function upload_mb() { | |
$max_upload = parse_size(ini_get('upload_max_filesize')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File adapted from: https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess | |
# ------------------------------------------------------------------------------ | |
# | File Types | | |
# ------------------------------------------------------------------------------ | |
# Allow access from all domains for web fonts | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<widget xmlns="http://openajax.org/metadata" spec="1.0" id="tag:adobe.com,2012-03:edge:oam:compid:mydocument" name="mydocument" version="1"> | |
<description type="text/html"><![CDATA[Widget Exported from Tumult Hype]]></description> | |
<category name="Adobe Edge Animation"/> | |
<remarks>Compatible with: InDesign CC, Dreamweaver CC, Muse</remarks> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Database connection information | |
$dbhost = 'localhost'; | |
$dbuser = ''; | |
$dbpass = ''; | |
$dbname = ''; | |
// Backup folder location | |
$backup_folder = '/path/backups'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instructions for syncing a local folder with a remote FTP or SFTP server | |
# The only requirement is homebrew. To get git-ftp: | |
brew update && brew install git-ftp | |
# Initialize a git repo in the directory you want to sync. Track all files, and commit them to your repo: | |
git init | |
git add -A && git commit -m "Committed all files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Manifest template to demonstrate the proper XML namespace declarations for | |
SCORM 1.2 manifests. | |
--> | |
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="com.scorm.manifesttemplates.scorm12" version="1" xsi:schemaLocation="http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd"> | |
<metadata> | |
<schema>ADL SCORM</schema> | |
<schemaversion>1.2</schemaversion> |
NewerOlder