Skip to content

Instantly share code, notes, and snippets.

View gtalarico's full-sized avatar
♥️
Python, Javascript, and Go

Gui Talarico gtalarico

♥️
Python, Javascript, and Go
View GitHub Profile
@gtalarico
gtalarico / revitapidocs_CycleTypes.py
Last active September 19, 2016 04:57
RevitAPIDOCS::Code Snippets::Cycles through Family Types in Family Manager
"""
CycleType
Cycle through available types in family manager
TESTED REVIT API: 2015
github.com/gtalarico
"""
__doc__ = 'Cycles through available types in family manager. \n' \
'Must be in Family Document.'
@gtalarico
gtalarico / logger.py
Last active September 26, 2016 05:08
Logger Wrapper
import logging
import sys
class LoggerWrapper():
""" Logger Wrapper to extend loggers functionality.
Usage:
logger = LoggerWrapper()
Additional Features:
logger.title('Message'): Outputs lines above and below, uses clean format
logger.error('Message'): appends errmsg to self.errors.
@gtalarico
gtalarico / revitapidocs_SelectAllDoors.py
Last active September 30, 2016 13:45
RevitAPI::Code Snippets::Select All Doors
"""
SelectDoors
Selects All Door Instances
TESTED REVIT API: 2015 | 2016
Gui Talarico
"""
from Autodesk.Revit.UI import TaskDialog
from Autodesk.Revit.DB import FilteredElementCollector
from Autodesk.Revit.DB import BuiltInCategory, ElementId
@gtalarico
gtalarico / revitapidocs_RemoveUnderlay.py
Last active October 3, 2016 12:46
RevitAPI::Working Tools::Remove Underlay
"""
RemoveUnderlay
Removes Underlay From Selected Views.
TESTED REVIT API: 2015 | 2016
Copyright (c) 2014-2016 Gui Talarico
This script is part of PyRevitPlus: Extensions for PyRevit
github.com/gtalarico
@gtalarico
gtalarico / timer.py
Last active October 5, 2016 04:34
Simple Timer Class
class Timer(object):
"Time and TimeIt Decorator"
def __init__(self):
self.start_time = time.time()
def stop(self):
end_time = time.time()
duration = end_time - self.start_time
return duration
@gtalarico
gtalarico / .profile
Created May 24, 2018 00:14
Install Private Git on Heroku w/ exposing credentials in requirements.txt
# Add this file to app root, Heroku will execute it on start, clone repo and add location to path
DIR=./package
if [ -d "$DIR" ]; then
printf '%s\n' "Deleting existing folder: ($DIR)"
rm -rdf "$DIR"
fi
# GIT_CREDENTIALS=username:pwd
echo "Cloning..."
@gtalarico
gtalarico / debounced.vue
Created June 4, 2018 18:34
VueJs _.debounce filtering
<template>
<input class="input is-small" type="text" placeholder="Filter" v-model="query" @keyup='doFilter'>
</template>
<script>
...
data () {
return {
this.debouncedQuery = '',
this.query = ''
@gtalarico
gtalarico / boxstarter.ps1
Last active January 15, 2019 19:09
Boxstarter setup script
# Description: Boxstarter Script
# Author: Gui Talarico
# Original boxstarter script by Jesse Frazelle (https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f)
#
#
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2019-01-10
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
@gtalarico
gtalarico / App.vue
Created March 21, 2019 06:09
three-vue-template-1
<template>
<div id="app">
<navbar />
<router-link to="/">Home</router-link>
</div>
</template>
<script>
import Navbar from '@/components/Navbar.vue'
export default {
@gtalarico
gtalarico / OrbitControls.js
Last active March 21, 2019 06:27
threejs-vue-template-2
// src/three/OrbitControls.js
// Note: file content truncated for display
// Be sure to include the entire content from
// https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley