Skip to content

Instantly share code, notes, and snippets.

View seanwittmeyer's full-sized avatar

seanwittmeyer seanwittmeyer

View GitHub Profile
@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"
@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 / 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 / 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'");
<?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 / 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 {} \;
@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 / 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 / Pylos_ExportFile.py
Last active December 15, 2019 19:36
grasshopper definition exporter for pylos
# Pylos: A Plugin for example file sharing
#
# This file is part of Pylos. It is an adaptation of the hydrashare platform by the Ladybug dev team (they rock!) for use in the zgf environment.
"""
Use this component to export your GH file to your Pylos repository so that you can upload and share with the community!
-
Provided by Pylos 1.1.2