Skip to content

Instantly share code, notes, and snippets.

View GiacomoManzoli's full-sized avatar

Giacomo Manzoli GiacomoManzoli

View GitHub Profile
@GiacomoManzoli
GiacomoManzoli / MassAssignTopicTags.hnd.pas
Created May 20, 2025 07:17
This script assigns the specified tags to all available topics
{****************************************************************************************
"MassAssignTopicTags"
---------------------
This script assigns the specified tags to all available topics
****************************************************************************************}
var aTopicId: string;
@GiacomoManzoli
GiacomoManzoli / cloudSettings
Last active February 27, 2020 21:04
vscode config
{"lastUpload":"2020-02-27T21:04:26.036Z","extensionVersion":"v3.4.3"}
@GiacomoManzoli
GiacomoManzoli / method.omh
Last active November 20, 2019 07:15
Sample gist with the Omnis JSON conversion
# define:
# %%error - char
# %%json - char
# lbinData - Binary
# llList - List (source list)
# llResult - List (converted back)
Do llList.$define()
Do llList.$cols.$add('C1',kCharacter,kSimplechar)
@GiacomoManzoli
GiacomoManzoli / restart.sh
Created September 5, 2019 09:23
script per far ripartire Omnis con un $runapplescript
#!/bin/sh
while : ; do
LINES=$(ps auxw | grep "/Applications/4K__Dev/OS4K_817.app" | grep -v grep | grep -v sh | wc -l | awk '{print $1}')
echo "test:$LINES"
if [ "$LINES" -eq "0" ]; then
break
fi
done
echo "/Applications/4K__Dev/OS4K_817.app chiuso!"
open -a "/Applications/4K__Dev/OS4K_817.app"
// Con Promise
let ifcObject = ... // un oggetto ritornato dal model
ifcObject.promiseGetIsDefinedBy(relations => {
relations = relations.filter(rel => rel.getType() === "IfcRelDefinesByType");
return relations[0].promiseGetRelatingType();
}).then(ifcObjectType => {
console.log(ifcObjectType.getName());
});
# ~~~ PRE INSTALL ~~~
APP_DIR='/Applications/_4KTestInstaller/'
TEMP_PREFIX='TEMP_'
filesToRestore=('File2.txt' 'Dir2/File2.txt')
echo "** Creazione dei file temporanei **"
echo "-----"
for ((i=0;i<${#filesToRestore[@]};++i)); do
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
// Note that this type definition it's not complete.
import BimServerApiPromise from 'BimServerApiPromise';
declare module 'BimServerClient' {
type TranslateFN = (string) => string;
type InterfaceMapping = {
ServiceInterface: "org.bimserver.ServiceInterface",
NewServicesInterface: "org.bimserver.NewServicesInterface",
declare module 'BimServerApiPromise' {
type Callback = () => void;
export default class BimServerApiPromise {
constructor(count?: number);
done(callback: Callback) : BimServerApiPromise;
inc() : void;
dec() : void;
fire() : void;
chain(BimServerApiPromise) : void;
[
{
"nome": "Muro 1",
"guid": "3sMAhS79HDCvOn7zP3Q8qI",
"quantitySets": [
{
"name": "BaseQuantities",
"quantities": [
{ "name": "Altezza", "value": "2.7", "um": {"prefix": "", "name": "METRE"}},
{ "name": "Lunghezza", "value": "3.5", "um": {"prefix": "", "name": "METRE"}},