Skip to content

Instantly share code, notes, and snippets.

@StudioLE
StudioLE / AutoCAD Setup.js
Last active December 5, 2024 11:04
AutoCAD Setup
// Display start tab and not a new drawing on Startup
// https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-open-AutoCAD-without-opening-Drawing1.html
Command: STARTUP
Value: 2
// Disable drawing thumbnails when hovering a tab
// https://forums.autodesk.com/t5/autocad-forum/how-to-turn-off-file-tab-hover-preview/m-p/6347588#M126228
Command: FILETABPREVIEW
Value: 0
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
list = IN[0]
replace = IN[1]
bool_list = IN[2]
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB impt *
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
id = DesignOption.GetActiveDesignOptionId(doc)
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
#Determine if FamilyInstance is Mirrored by Yna_Db
#https://forum.dynamobim.com/t/group-is-mirrored-or-not/14588/33
OUT = [UnwrapElement(x).Mirrored for x in IN[0]]
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
true_list = IN[0]
false_list = IN[1]
bool_list = IN[2]
{
"psFormat": "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
}
{
"psFormat": "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
}
@StudioLE
StudioLE / crontab -e
Created January 21, 2017 22:08
Sync directory to S3
*/5 * * * * ~/sync.sh >> ~/sync.log 2>&1
@StudioLE
StudioLE / IntentSchema.json
Created January 4, 2017 22:20
Control Chromecast with the Amazon Echo via HomeAssistant
{
"intents": [
{
"intent": "MediaPlayIntent",
"slots": []
},
{
"intent": "MediaPauseIntent",
"slots": []
},
@StudioLE
StudioLE / request.sql
Last active September 25, 2016 14:36
Wikidata Graph: Connect places by architectural style in city
# Wikidata Query Service at:
# https://query.wikidata.org/
#defaultView:Graph
SELECT ?place ?placeLabel ?location ?style ?styleLabel ?instanceLabel
# SELECT ?style ?styleLabel (count(*) as ?count)
WHERE {
wd:Q84 wdt:P625 ?loc . # Geo-coords of Newcastle upon Tyne: Q1425428; London:Q84
SERVICE wikibase:around {