Skip to content

Instantly share code, notes, and snippets.

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

Federico Mengozzi fedemengo

:octocat:
coding thoughts
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.
1100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111001100011101000000001000001011101111101010011000111011000100111001101100100010010100010100101000001000011110011000111000110100000001001101110111101111100101010001100110110011110011010011101001000011000110110011000000101011000010100110110111110010010111110001010000110111010011111110000100110101011011010110110101010001110000100100010111100100100001011011010101110110011000100101111001111110110001101111010001001100010000101110100110100110001101111110110101101011000010111111111101011100101101101111010000000110101101111110110111101110001110000110101111111011010110101000100110011111101001011010111010011111001001000001000101111100010010110001111111100110010010010010100001100110010100011110110011100100010110110011110111000010000000000111110010111000101000010110001110111111000001011001100011011010010010000011011000011100010101011101001110011010
@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.
11.0010010000111111011010101000100010000101101000110000100011010011000100110001100110001010001011100000001101110000011100110100010010100100000010010011100000100010001010011001111100110001110100000000100000101110111110101001100011101100010011100110110010001001010001010010100000100001111001100011100011010000000100110111011110111110010101000110011011001111001101001110100100001100011011001100000010101100001010011011011111001001011111000101000011011101001111111000010011010101101101011011010101000111000010010001011110010010000101101101010111011001100010010111100111111011000110111101000100110001000010111010011010011000110111111011010110101100001011111111110101110010110110111101000000011010110111111011011110111000111000011010111111101101011010100010011001111110100101101011101001111100100100000100010111110001001011000111111110011001001001001010000110011001010001111011001110010001011011001111011100001000000000011111001011100010100001011000111011111100000101100110001101101001001000001101100001110001010101110100111001101

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