Skip to content

Instantly share code, notes, and snippets.

View DanyWallace's full-sized avatar
💭
everyone is a girl on the internet

Daniel Wallace DanyWallace

💭
everyone is a girl on the internet
View GitHub Profile
@schweigert
schweigert / Embedding GoLang into a Ruby application.md
Last active May 3, 2024 19:23
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

@yasinkuyu
yasinkuyu / vesta_email_script.php
Last active December 28, 2021 06:17
Create email account vesta script
<?php
// Server info
$vst_hostname = 'server.vestacp.com';
$vst_username = 'admin';
$vst_password = 'p4ssw0rd';
$vst_returncode = 'yes';
$vst_command = 'v-add-mail-account';
// New account info