Skip to content

Instantly share code, notes, and snippets.

View seanwittmeyer's full-sized avatar

seanwittmeyer seanwittmeyer

View GitHub Profile
@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
@seanwittmeyer
seanwittmeyer / basic-imagemagick
Created September 12, 2017 06:45
cut autodesk pano into cube tiles for gear vr and panolens
# create 12 tiles
convert -crop 1536x1536 imageL.jpg L.png
convert -crop 1536x1536 imageR.jpg R.png
convert R-2.png R-0.png R-5.png R-4.png R-1.png R-3.png L-2.png L-0.png L-5.png L-4.png L-1.png L-3.png +append result.png
echo ‘{ "title": “result.png”, "author": “anon”}’ > result.json
@seanwittmeyer
seanwittmeyer / pano-details.html
Created September 11, 2017 20:28
Google Maps Street-View point attribute viewer
<!DOCTYPE html>
<!--
this little handy dandy applet was adapted by code from Soldeplata Saketos #win
https://stackoverflow.com/questions/29916149/google-maps-streetview-how-to-get-panorama-id
-->
<html>
<head>
<meta charset="utf-8">
<style>
@seanwittmeyer
seanwittmeyer / pylos-grasshopper.ghuser
Last active April 6, 2017 16:28
Pylos grasshopper component
# 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 0.0.03
@seanwittmeyer
seanwittmeyer / README.md
Last active April 2, 2017 00:40
Test block
@seanwittmeyer
seanwittmeyer / keybase.md
Created January 22, 2015 21:03
keybase proof

Keybase proof

I hereby claim:

  • I am seanwittmeyer on github.
  • I am seanwittmeyer (https://keybase.io/seanwittmeyer) on keybase.
  • I have a public key whose fingerprint is F001 75C7 2B23 2E8E 8D1F B87F FA6D E4FE D0AA 1C28

To claim this, I am signing this object:

@seanwittmeyer
seanwittmeyer / cronbackup.sh
Created November 25, 2013 17:37
File makes a backup of a directory and mysql database on (mt)'s grid. Before running these in your grid service data folder, you would create the backup directory with 777 permissions then you would make the scripts executable. via TJ Stein (http://tjstein.com/articles/media-temple-gs-grid-service-domain-and-mysql-backups/)
#!/bin/bash
today=$(date '+%d_%m_%y')
echo "* Performing domain backup..."
tar czf /home/00000/data/backup/example.com_"$today".tar.gz -C / home/00000/domains/example.com
# Remove backups older than 7 days:
MaxFileAge=7
find /home/00000/data/backup/ -name '*.gz' -type f -mtime +$MaxFileAge -exec rm -f {} \;
echo "* Backed up..."
@seanwittmeyer
seanwittmeyer / bootstrap-maps-fix.css
Created November 18, 2013 06:31
Fix for Google Maps control images conflicting with Bootstrap 2.x
#mapCanvas img {
max-width: none;
}
#mapCanvas label {
width: auto;
display:inline;
}
@seanwittmeyer
seanwittmeyer / camperapi-district-response.js
Created November 5, 2013 17:23
This is a sample response of a district from the Camper API. By default, the API formats the response for typeahead.js usage but you can utilize the value GET parameter to customize the value.
[
{
"name": "Cache La Poudre",
"schools": "Poudre & Windsor School Districts, Colorado",
"value": "Cache La Poudre",
"tokens":
[
"Poudre",
"Cache",
"la",
@seanwittmeyer
seanwittmeyer / typeaheadjs-link.js
Created October 23, 2013 16:39
This is an example of using typeahead.js to prefetch a source, template the results with hogan.js, and send the user to a URL location using the typeahead:autocompleted or typeahead:selected event handlers using jQuery. It takes the result datum and sends a user on their way once the field has been autocompleted (via tab or enter key) or our use…