Skip to content

Instantly share code, notes, and snippets.

Avatar

Francesco Bertolaccini frabert

View GitHub Profile
@frabert
frabert / COPYING
Last active May 12, 2022
Favicons for HN
View COPYING
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
View TransposeChordsUp.lua
local selectedMediaItems = reaper.CountSelectedMediaItems(0)
local notes = { 'A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#' }
function transpose(amount, note)
local index = 0
for i, v in ipairs(notes) do
if v == note then
index = i
end
@frabert
frabert / es4.c
Created Jun 24, 2017
Esercizio 4 (25/07/2017) esercitazione
View es4.c
#include <stdlib.h>
#include <stdio.h>
typedef struct node {
int k;
struct node *l, *r;
} node_t;
void insert(node_t **n, int k) {
if(*n == NULL) {
@frabert
frabert / scheletro1.c
Last active Jan 6, 2017
Scheletri per esercitazione
View scheletro1.c
#include <stdio.h>
#include <stdlib.h>
// Funzioni da implementare
int *leggiInput(int *dim);
int *eliminaDup(int *vect, int dim, int *dim_nodup);
int ugualeASomma(int *vect, int dim);
int *maggioreDeiSuccessivi(int *vect, int dim);
int main() {
View m_matrici.c
#include <stdio.h>
#include <stdlib.h>
void stampaMatrice(int** a, int h, int w) {
for(int i = 0; i < h; i++) {
for(int j = 0; j < w - 1; j++) {
printf("%d ", a[i][j]);
}
printf("%d\n", a[i][w - 1]);
}
View esempio_funzione.c
#include <stdio.h>
int conta(int a[], int elem, int init, int end) {
int tmp = 0;
int i;
for(i = init; i < end; i++) {
if(a[i] == elem) tmp++;
}
return tmp;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am frabert on github.
  • I am frabert (https://keybase.io/frabert) on keybase.
  • I have a public key whose fingerprint is DC75 8F7B 6546 19F4 2632 8425 E13E E8E1 F7F4 C157

To claim this, I am signing this object:

View BasicNetLua.cs
// using NetLua;
var lua = new Lua();
lua.DynamicContext.var = LuaObject.NewTable(); // Using dynamic features
lua.DynamicContext.var.x = 4; // Automatic type casting
lua.DoString("var.x = 5"); // Simple API
Console.WriteLine(lua.DynamicContext.var.x); // Writes 5