Skip to content

Instantly share code, notes, and snippets.

@aaronsb
aaronsb / readme.md
Last active March 10, 2025 13:20
Rhino3D 7 on Linux

Install Rhino 7 on Ubuntu based OS (KDE on Ubuntu Noble in this case) I used Wine 9.10 (Staging)

This assumes a non existant wine prefix or even a wine installation. If you have an existing wine prefix there may be things that interfere with this guide.

  • Start by installing wine and some required adjacent libraries.

sudo apt install wine wine32 winetricks mono-complete winbind

  • Initialize your default Wine environment (which will be located under ~/.wine
@mario52a
mario52a / Delta_XYZ
Last active December 18, 2021 19:19
Gives the Delta values and distance between 2 points. If the SHIFT key is pressed, the Delta value begin on coordinate 0,0,0 to point clicked (the coordinate 0,0,0 is displayed in red).
# -*- coding: utf-8 -*-
#Delta x y z Click Q to quit
#
#OS: Windows 10 (10.0)
#Word size of OS: 64-bit
#Word size of FreeCAD: 64-bit
#Version: 0.19.22808 (Git)
#Build type: Release
#Branch: master
#Hash: 72eb41b24f12b572d55081042160954b93f4614c
@snelweg
snelweg / Macro_FCSpring_Helix_Variable.FCMacro
Created October 19, 2020 19:57 — forked from mario52a/Macro_FCSpring_Helix_Variable.FCMacro
This macro creates a spring with customizable, any turn may change the spring configuration can be saved in a file with the extension .FCSpring
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
"""
***************************************************************************
* Copyright (c) 2014-2015-2016-2017 2018 2019 2020 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@johnjeffers
johnjeffers / ubuntu-20.04-macbook-pro.md
Created May 31, 2020 00:21
Ubuntu 20.04 on a 15" Retina MacBook Pro (Mid-2014)

Ubuntu 20.04 on a 15" Retina MacBook Pro (Mid-2014)

These are notes from my efforts to get Ubuntu 20.04 installed on my older MacBook Pro. I'm making this gist public in the hopes that it's helpful to others.

I did a Minimal install, but selected the option to install additional 3rd-party drivers.

Wifi doesn't work during the install (because it requires a 3rd-party driver), so you won't be able to choose to download updates while installing. No big deal, run a software update after the install.

The installer takes about 25 minutes to complete. Post-install, most things work. The only driver I had to manually install was for the FaceTime camera. More on that below.

@jamiephan
jamiephan / Hidden.bat
Last active October 14, 2024 14:19
Launch a batch file without showing the window, within one file and without third-party tools
@echo off
if not "%1"=="Opened_Via_PS" (
pushd %~dp0
REM //TODO: Use Env variable instead of passing checking arg.
rem Adopted from https://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way
rem The " ^" at the end is similar to " \" for multi-line scripts.
rem Extend the %1 %2 (%3...) below if you have multiple command line args.
powershell.exe -NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command ^
"(New-Object -ComObject WScript.Shell).Run('\"%cd%\%~n0%~x0\" Opened_Via_PS %1 %2', 0, 'false')"
bl_info = {
"name": "FreeCAD Importer",
"category": "Import-Export",
"author": "Yorik van Havre",
"version": (5, 0, 0),
"blender": (2, 80, 0),
"location": "File > Import > FreeCAD",
"description": "Imports a .FCStd file from FreeCAD",
"warning": "This addon needs FreeCAD installed on your system. Only Part- and Mesh-based objects supported at the moment.",
}
@stefanocoding
stefanocoding / activate_intel_gpu_on_macbookpro.md
Last active July 24, 2024 19:50
Activate integrated Intel GPU of a MacBook Pro Mid 2014 (MacBookPro11,3) on Ubuntu 18.04

This may work with other Macbook Pro models that have an Intel GPU and a NVidia one, but I only have proof that this works on a MacBook Pro Mid 2014 (MacBookPro11,3) with Ubuntu 18.04. If you want to be sure about which model you have, run sudo dmidecode -t system in the Terminal and you will see the information about the system including the serial number and product name (MacBookPro11,3 in my case). I'm assuming you have installed the NVidia propietary drivers, which can be installed from the application "Software & Updates" in the tab "Additional Drivers".

Steps to use the Intel GPU:

  1. Run lspci |grep VGA and check that only one line mentioning "NVIDIA" is printed. This is to be sure that you are required to do the following steps. If two lines appear, and one of those mentions "Intel", then you probably do not need to activate the GPU but only select it as the main GPU (jump to the step where you have to "Open nvidia-settings").
  2. Download apple_set_os.efi from https://github.com/0xbb/apple_se
@mario52a
mario52a / Macro CirclePlus.FCMacro
Last active December 18, 2021 19:19
This small macro create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point), placemObject on choice. And ccreate sector.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2018 2019 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@glasslion
glasslion / vtt2text.py
Last active March 9, 2025 02:54
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@mario52a
mario52a / Macro_FCSpreadSheet_Extract.FCMacro
Last active December 18, 2021 19:20
This macro save the spreadsheet data in a csv file with the formula or in a xml file.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2018 2019 2020 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *