Skip to content

Instantly share code, notes, and snippets.

View seanwittmeyer's full-sized avatar

seanwittmeyer seanwittmeyer

View GitHub Profile
<?php
$sector = (isset($_REQUEST['sector'])) ? $_REQUEST['sector'] : 'dtw';
$icing_product = (isset($_REQUEST['icing_product'])) ? $_REQUEST['icing_product'] : 'ch14';
?>image_base = http://icingweather.proxydns.com/~lowice/goes/png/
file_of_filenames=files.<?php echo $sector;?>.<?php echo $icing_product;?>
controls = startstop,step,firstlast,speed
controls_style = background-color:white;
buttons_style = margin:3px;font-family:arial;font-size:20px;background:white;border-radius:10px;border-style:solid;border-color:gray;
dwell = 150
@seanwittmeyer
seanwittmeyer / forgeactivity.php
Created June 6, 2019 19:45
this is a forge activity that opens rvt files and outputs a json file
$postfield = '{
"id": "'.$activitytitle.'",
"commandLine": [ "$(engine.path)\\\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles['.$apptitle.'].path)" ],
"parameters": {
"rvtFile": {
"zip": false,
"ondemand": false,
"verb": "get",
"description": "Input Revit model",
"required": true
@seanwittmeyer
seanwittmeyer / photoperms.sh
Created April 8, 2019 17:35
photos permissions, with secret sauce
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
sudo find /opt/bitnami/apps/title/htdocs -type d -exec chmod 0775 {} \;
sudo find /opt/bitnami/apps/title/htdocs -type f -exec chmod 0664 {} \;
@seanwittmeyer
seanwittmeyer / permissions.sh
Created April 4, 2019 21:31
bitnami wordpress permissions example
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
sudo find /opt/bitnami/apps/title/htdocs -type d -exec chmod 0775 {} \;
sudo find /opt/bitnami/apps/title/htdocs -type f -exec chmod 0664 {} \;
<?php # listgames.php
require_once ('include/dbclass.php');
$db = new Db();
$week = '1';
$row = $db -> select("select favorite,favscore,spread,underdog,undscore,home from 2018games where week='$week' order by game");
$ng = count($row);
for ($j=0; $j<$ng; $j++) {
$favscore = $row[$j]["favscore"]; $fav = $row[$j]["favorite"];
$undscore = $row[$j]["undscore"]; $und = $row[$j]["underdog"];
@seanwittmeyer
seanwittmeyer / excel-feet-inches.md
Last active October 10, 2018 20:06
Format an excel cell into feet and inches

Format decimal lengths into feet and inches by using this: Replace 'B18' with your cell to be converted

=FLOOR(B18,1)&"' "&TEXT((MOD(B18,1)*12),"0 #/##")&CHAR(34)

@seanwittmeyer
seanwittmeyer / db-connect-test.php
Created August 27, 2018 19:02 — forked from M165437/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@seanwittmeyer
seanwittmeyer / us-atlas.geojson
Created August 20, 2018 05:45
us map in geojson format
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seanwittmeyer
seanwittmeyer / EnergyPlusWeatherSites.geojson
Created August 7, 2018 23:46
weather data from energy plus as a geojson file for mapping
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seanwittmeyer
seanwittmeyer / RangeChoice.py
Created July 11, 2018 17:54
range choice python component by jonah hawk for the udan project
"""Provides a scripting component.
Inputs:
min: Minimum value for the range
max: Maximum value for the range
count: the length of the list of number, including the min and max values.
i: index choice of the list
Output:
a: The a output variable"""
__author__ = "jonah.hawk"