Skip to content

Instantly share code, notes, and snippets.

View ThreePointSquare's full-sized avatar
💭
I may be slow to respond.

ThreePointSquare

💭
I may be slow to respond.
View GitHub Profile
@ThreePointSquare
ThreePointSquare / FParameterData.cs
Created February 8, 2024 15:13 — forked from imAliAsad/FParameterData.cs
Read and export all parameter data of a family
public class FParameterData
{
public string Family { get; set; }
public string BuiltinParameter { get; set; }
public string ParameterType { get; set; }
public string ParameterName { get; set; }
public string ParameterValue { get; set; }
public string ParameterGroup { get; set; }
public string BuiltinGroup { get; set; }
@ThreePointSquare
ThreePointSquare / demo_polynomial.py
Created December 5, 2023 17:18
Taylor Polynomial Using Numpy and Rhino Python
#! python3
# r: numpy
import numpy as np
import rhinoscriptsyntax as rs
def get_cosine_points(x):
return x, np.cos(x)
@ThreePointSquare
ThreePointSquare / overpass.md
Created October 10, 2021 03:31 — forked from planemad/overpass.md
Creating custom OSM based maps using Mapbox

If you have been playing around with the new Mapbox Studio you might be interested to know how to make a custom map with objects of your own interest from OpenStreetMap.

To make the process of creating an updating an OSM based dataset on Mapbox more seamless, I was looking into a command line based workflow that could extract OSM data from Overpass and update a Mapbox hosted dataset in one go.

Requirements

Generate an Overpass Query

  • Use Overpass Turbo to create a query for the data you are interested in extracting. Since i'm interested in bus stops, I first browse the map to Bengaluru, India and then generate a query using the wizard query highway=bus_stop
@ThreePointSquare
ThreePointSquare / index.markdown
Created September 27, 2021 15:10
WebGL particle head
WebGL head made of particles
@ThreePointSquare
ThreePointSquare / index.markdown
Created September 27, 2021 15:10
WebGL particle head
WebGL head made of particles
@ThreePointSquare
ThreePointSquare / DmaHvBackdoor.c
Created September 8, 2021 11:05 — forked from Cr4sh/DmaHvBackdoor.c
Hyper-V backdoor for UEFI
/*
*********************************************************************
Part of UEFI DXE driver code that injects Hyper-V VM exit handler
backdoor into the Device Guard enabled Windows 10 Enterprise.
Execution starts from new_ExitBootServices() -- a hook handler
for EFI_BOOT_SERVICES.ExitBootServices() which being called by
winload!OslFwpKernelSetupPhase1(). After DXE phase exit winload.efi
transfers exeution to previously loaded Hyper-V kernel (hvix64.sys)
@ThreePointSquare
ThreePointSquare / mongodb_c#_cheatsheet.md
Created July 4, 2021 00:40 — forked from a3dho3yn/mongodb_c#_cheatsheet.md
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "First parameter is a file with a list of repos git-batch-upstream-branch-update repos.txt"
fi
ROOTDIR=$(pwd)
cd $ROOTDIR
cat $1 | while read line
@ThreePointSquare
ThreePointSquare / CopyRooms.py
Created June 23, 2021 23:47 — forked from ENGworks-DEV/CopyRooms.py
Copy rooms from a link to host document
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory, SpatialElementBoundaryOptions, CurveArray, UV,Transaction, ViewPlan
from Autodesk.Revit.UI import Selection
import Autodesk.Revit.Creation
def selectLink():
link = uidoc.Selection.PickObject(Selection.ObjectType.Element, "Select Revit link")
return doc.GetElement(link.ElementId)
def getRooms(link, doc):
print( doc.ActiveView.Id)
@ThreePointSquare
ThreePointSquare / .blocks.json
Created January 16, 2021 00:29 — forked from vasturiano/.blocks.json
3D Force-Directed Graph (ThreeJS)
{"nodes":[{"id":"4062045","user":"mbostock","description":"Force-Directed Graph"},{"id":"1341021","user":"mbostock","description":"Parallel Coordinates"},{"id":"1341281","user":"jasondavies","description":"Parallel Coordinates"},{"id":"b3ff6ae1c120eea654b5","user":"d3noob","description":"Simple d3.js Graph"},{"id":"4963004","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4962892","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4963273","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4967213","user":"calvinmetcalf","description":"Rtree Madness"},{"id":"4060606","user":"mbostock","description":"Choropleth"},{"id":"4686432","user":"dwtkns","description":"Faux-3d Shaded Globe"},{"id":"3757101","user":"mbostock","description":"Lambert Azimuthal Equal-Area"},{"id":"5028304","user":"d3noob","description":"Sankey diagram with horizontal and vertical node movement"},{"id":"4343214","user":"mbostock","description":"Quadtree"},{"id":"1346410","user"