Skip to content

Instantly share code, notes, and snippets.

View simonemarra's full-sized avatar
🐈‍⬛

Simone Marra simonemarra

🐈‍⬛
View GitHub Profile
@simonemarra
simonemarra / fluttercleanrecursive.sh
Created December 7, 2022 12:38 — forked from jeroen-meijer/fluttercleanrecursive.sh
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
@simonemarra
simonemarra / pm2_ubuntu.sh
Created August 12, 2020 11:01 — forked from WillDent/pm2_ubuntu.sh
Installation of PM2 on Ubuntu so it autostarts scripts
# Requirements:
# Node Installed
# Safe User that is running as node
#1) Install pm2
sudo npm install -g pm2
#2) Set-up PM2 to autostart upon server rebooting
#sudo env PATH=$PATH:/usr/local/bin pm2 startup <platform> -u <safe_user_not_root>
sudo env PATH=$PATH:/usr/local/bin pm2 startup ubuntu -u ubuntu
@simonemarra
simonemarra / stream.js
Created November 2, 2017 15:43 — forked from padenot/stream.js
How to serve media on node.js
var http = require('http');
var path = require('path');
var fs = require('fs');
var AUDIOFILE = "./audio.ogg";
function serveWithRanges(request, response, content) {
var range = request.headers.range;
var total = content.length;
var parts = range.replace(/bytes=/, "").split("-");
#include <fsl_port.h>
#include <fsl_gpio.h>
#include <fsl_debug_console.h>
#include <fsl_sai.h>
#define RX_SAI_IRQ I2S0_Rx_IRQn
#define SAI_RxIRQHandler I2S0_Rx_IRQHandler
bool isFinished = false;
uint32_t temp[2000];