Skip to content

Instantly share code, notes, and snippets.

View mvanotti's full-sized avatar
🐦
Nobody knows anything about horses

Marco Vanotti mvanotti

🐦
Nobody knows anything about horses
View GitHub Profile
@mvanotti
mvanotti / lista.c
Created September 4, 2012 23:05
TP1 Implementación en C
#include "lista.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
static void *copiar_dato(tipo t, void *dato) {
int *nuevo_i;
double *nuevo_d;
char *nuevo_s;

tl;dr: Guia que explica qué es ssh, cómo se usa y cómo lo pueden usar de forma eficiente para facilitarles la vida con el tp


Hola!

En este documento van a encontrar información que les va a facilitar la vida en ORGA2 y otras materias, cuando quieran conectarse remotamente a los laboratorios. Espero lo lean y encuentren utilidad en el mismo :).

Decidí dividirlo en varias partes, de forma tal que pueden saltear las que no les interesen.

DISCLAIMER: No me hago cargo de nada de lo que les pueda pasar a sus computadoras o a ustedes por seguir estos consejos. Esto incluye (pero no se limita a): Perdida de acceso ssh a otros servidores, perdida de informacion en su pc local, perdida de tps, ganas de llorar, perdida de cordura y locura espontánea.

@mvanotti
mvanotti / parsemounts.go
Created May 31, 2014 19:20
Display all the filesystem mount points and their respective type.
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
// Display all the mounted filesystems and their respective type.
@mvanotti
mvanotti / mininet-itz.py
Created September 10, 2016 02:49
POX Errors, while trying to run a Mininet fat tree topology with 64 nodes.
from time import sleep
from mininet.topo import Topo
from mininet.topolib import TreeTopo
from mininet.net import Mininet
from mininet.log import setLogLevel
from mininet.node import RemoteController
from mininet.node import OVSSwitch, OVSKernelSwitch
from mininet.link import TCLink
from random import sample
@mvanotti
mvanotti / main.cpp
Created October 21, 2017 03:46
UVA Problem 11974 - Switch The Lights
#include <algorithm>
#include <queue>
#include <vector>
#include <stdio.h>
#include <string.h>
#define MAX_ELEMS 1 << 16
static bool visited[MAX_ELEMS] = {false};
@mvanotti
mvanotti / automated.py
Created January 24, 2019 17:22 — forked from MatthewWilkes/automated.py
Extract deleted commits from a GitHub repo
import argparse
import os
import re
import subprocess
import tempfile
import requests
def get_repo(owner, repo):
@mvanotti
mvanotti / codeql-database-analyze-output.log
Created February 2, 2020 03:01
codeql database analyze output
Writing logs to /home/user/codeql-home/fuchsia-ql/log/database-analyze-20200129.111407.684.log.
Running queries.
Writing logs to /home/user/codeql-home/fuchsia-ql/log/execute-queries-20200129.111408.306.log.
Expanding query suite /home/user/codeql-home/ql/cpp/ql/src/codeql-suites/cpp-lgtm-full.qls.
Suite description = Standard LGTM queries for C/C++, including ones not displayed by default
Scanning for QL files at /home/user/codeql-home/ql/cpp/ql/src.
Found 553 QL files in /home/user/codeql-home/ql/cpp/ql/src.
Scanning for qlpack.yml from /home/user/codeql-home/
Scanning for qlpack.yml from /home/user/codeql-home/codeql/.codeqlmanifest.json
Scanning for qlpack.yml from /home/user/codeql-home/ql/.codeqlmanifest.json
@mvanotti
mvanotti / cc-files-in-db
Created April 16, 2020 20:01
This gist contains two list of files: `compile_commands` groups the files listed in the compile_commands after building fuchsia, and `cc-files-in-db` lists all the cc files that appear in the database created by codeQL.
/build/tools/json_merge/json_merge.cc
/build/tools/json_merge/main.cc
/build/tools/json_merge/test.cc
/build/tools/json_validator/main.cc
/examples/dotmatrix_display/create_ssd1306.cc
/examples/dotmatrix_display/fuchsia_logo.cc
/examples/dotmatrix_display/main.cc
/examples/dotmatrix_display/space_invaders.cc
/examples/fidl/echo_client/cpp/main.cc
/examples/fidl/echo_server/cpp/main.cc
@mvanotti
mvanotti / asan-poisoning.cc
Last active January 26, 2021 05:13
kasan exchange stacks
/**
This code is useful for moments when the stack might be corrupted.
On the first asan panic, asan will disable further panics and switch
to a new stack.
*/
// ktl::atomic<bool> g_asan_panic = false;
// uint8_t kasan_panic_stack[4096];
if (g_asan_panic.exchange(true)) {
@mvanotti
mvanotti / alpine-musl.supp
Created March 28, 2021 00:23
Valgrind suppressions for valgrind 3.15 running on alpine linux with musl. See https://bugs.kde.org/show_bug.cgi?id=426751. See also https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto
{
"Sup 3 test"
Memcheck:Leak
match-leak-kinds: reachable
fun:calloc
obj:/lib/ld-musl-x86_64.so.1
fun:__dls3
obj:*
obj:*
obj:*