Skip to content

Instantly share code, notes, and snippets.

View Lucchetto's full-sized avatar

Lucchetto

View GitHub Profile
#include <iostream>
#include <math.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
using namespace std;
char fd_path[] = {"./.temperature"};
#include <iostream>
#include <pthread.h>
#include <unistd.h>
using namespace std;
int a=0;
int b=0;
bool token=true;
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
char path[] = {"./fuffa"};
@Lucchetto
Lucchetto / expippe.cpp
Last active November 20, 2019 20:45
Esercizi in preparazione per la CANATA
#include <iostream>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
using namespace std;
int main() {
// Pipe in cui padre trasmette
int pipe_parent[2];
// Zhenxiang Chen, Mattia Delorenzi, Andrea Inselvini
#include <iostream>
#include <fstream>
#include <unistd.h>
#define TIMEOUT 100000
using namespace std;
package com.acer.incallui;
import android.app.WallpaperManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
const http = require('http'),
server = http.createServer();
var urlExists = require('url-exists');
const files_url = "https://mirrors.dotsrc.org/osdn/storage/g/r/re/revengeos";
const json_file = "https://raw.githubusercontent.com/RevengeOS/ota/master/json.php"
const args = process.argv.slice(2);
var full_url;
server.on('request', (request, response) => {
#include <iostream>
#include <fstream>
using namespace std;
struct alunno {
char nome[50];
char materia[50];
int voto;
};
from ftplib import FTP
from datetime import datetime
import json
import os
import re
from time import sleep
# Global defs
ftp_url = "ftp.halifax.rwth-aachen.de"
work_path = "osdn/storage/g/r/re/revengeos"
@Lucchetto
Lucchetto / es1.sh
Last active April 4, 2019 06:38
Verifica del 25/03 di Mero
#!/bin/bash
gpio=/sys/class/gpio
pins=(0 14 18 24)
pin_to_use=${pins[$1]}
if [ pin_to_use != 0 ]; then
echo "Blinking the LED on pin" $pin_to_use
echo $pin_to_use > $gpio/unexport
echo $pin_to_use > $gpio/export
echo "out" > $gpio/gpio$pin_to_use/direction
echo "1" > $gpio/gpio$pin_to_use/value