Skip to content

Instantly share code, notes, and snippets.

View fedemengo's full-sized avatar
:octocat:
coding

Federico Mengozzi fedemengo

:octocat:
coding
View GitHub Profile
@fedemengo
fedemengo / notes.md
Created February 11, 2023 10:06
Go mod with private repos

In case you need to download mods, use gopls with mods from a private repo you could use this setup. Ideally you want to have a proper ssh-config, this is how to get it done over https

Inside ~/.gitconfig

[url "https://{{your_user}}:{{access_token}}@github.com/{{repo_owner}}"]
    insteadOf = https://github.com/{{repo_owner}}
@fedemengo
fedemengo / pi_b2_10M_mathematica
Last active February 22, 2023 20:03
First 10M digits of PI in base 2
This file has been truncated, but you can view the full file.
@fedemengo
fedemengo / pi_b2_1K_ad-hoc
Created December 29, 2022 19:45
First 1K digits of PI in base 2
11.0010011001111011100111010101011111100101010101111011111111100100100011111000110011101101111001000111110100110100011111111110101011101010011011111010111111101100011110011000111001001000111001110011111011111101001010111001100100110100111001111110011001100101101010010111010100100111101010111100011101001101101011000110110101100111001011110100111100110101100110010110010110011001111100110011010011001001111011011101111110110101111010011111111001111001011000111110001111111110111011010011101111000110110101110111001101011110010111001001001110110111110110111111010100101011000111010101101000111111101010011100101111100100111001011011010011111011101010100100110011111010011111111101011010001110101110101101001001001010100100101011111101010011011010101110100111110100111010100110101111101001100101011110111111111010101010011111010110011110011111100101111011100111101011111101011011001011110101101011011001001100101100111101011111100111101101111101001110011111000111001101110110111110100011101111011101001101
@fedemengo
fedemengo / pi_b2_1M_mathematica
Last active February 28, 2023 16:01
First 1M digits of PI in base 2
This file has been truncated, but you can view the full file.

Service Design

  • Author(s)
    • (Authors of this proposal)
    • @CAFxX (Carlo Alberto Ferraris)
  • Histroy
    • (List major version changes)
    • 2018/10/1: initial design
    • 2018/10/5: Reviewed with @tcnksm, @dragon3
  • 2019/12/1: added gRPC interface
000(023Rb|001Rb)
001(017La|002Rb)
002(021La|003Rb)
003(021La|004La)
004(009Rb|005Lb)
005(004Ra|005La)
006(008La|007La)
007(009Rb|007La)
008(009Ra|008La)
009(010Ra|026Ra)
@fedemengo
fedemengo / commads.md
Last active March 11, 2021 13:55
Matlab on Jupyter notebook

Steps

Assuming we are using python3.7

  • Install matlab, assume $HOME/.app/matlab
  • Install Jyputer, assume a notebook in a virtual env env3.7 in $HOME/projects/env3.7
  • cd $HOME/.app/matlab/extern/engines/python
  • python3.7 setup.py install --prefix="$HOME/projects/env3.7"
  • Then cd in your working directory $HOME/projects/
  • Start the notebook with source env3.7/bin/activate && jupyter notebook
@fedemengo
fedemengo / linux-fs-namespace-workaround.md
Last active March 11, 2021 09:23 — forked from MawKKe/linux-fs-namespace-workaround.txt
Not enough space on /tmp for Matlab install? No problem.

Problem scenario:


  1. stupid Matlab installer wants to download several gigabytes into your /tmp directory.
  2. You don't have "several gigabytes" available on your root partition (where /tmp is). The installer warns you and/or fails.
  3. You DO have available disk space, but on some other disk/partition/wherever.

Solution:


@fedemengo
fedemengo / commands.md
Last active March 7, 2021 09:56
Docker Oracle SQL Server + Oracle SQL Developer

Create local data directory

Since we might run and stop several containers, we want to at least keep the data

mkdir workspace/oracle
chmod ugo+rwx -R workspace/oracle

Run docker container