Skip to content

Instantly share code, notes, and snippets.

View luisfcorreia's full-sized avatar

Luis Correia luisfcorreia

View GitHub Profile
@luisfcorreia
luisfcorreia / synth.cpp
Created April 15, 2018 18:13 — forked from genericpenguin/synth.cpp
Arduino Synth
/* Arduino Synth from
https://janostman.wordpress.com/2016/01/15/how-to-build-your-very-own-string-synth/
*/
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
@luisfcorreia
luisfcorreia / TinyTS_v11.ino
Created April 15, 2018 14:12
The Tiny-TS Touch Synthesizer
// (*) All in the spirit of open-source and open-hardware
// Janost 2016 Sweden
 
// The Tiny-TS Touch Synthesizer
// https://janostman.wordpress.com/the-tiny-ts-diy-touch-synthesizer/
 
// Copyright 2016 DSP Synthesizers Sweden.
//
// Author: Jan Ostman
//
@luisfcorreia
luisfcorreia / microTS.ino
Created April 15, 2018 14:10 — forked from anonymous/microTS.ino
Source code for the micro-TS key fob synthesizer
// (*) All in the spirit of open-source and open-hardware
// Janost 2017 Sweden
 
// The Micro-TS Key fob Touch Synthesizer
// https://janostman.wordpress.com/the-microts-diy-synth/
 
// Copyright 2017 DSP Synthesizers Sweden.
//
// Author: Jan Ostman
//
@luisfcorreia
luisfcorreia / miniTSos09.ino
Created April 13, 2018 22:45 — forked from anonymous/miniTSos09.ino
mini-TS OS v0.9
#define SSD1306_SDA 4
#define SSD1306_SCL 5
#define SSD1306_SA 
0x78  // Slave address
 
import json
import requests
gramofon_ip = '127.0.0.1'
ori_sid = '00000000000000000000000000000000'
baseuri = 'http://' + gramofon_ip + '/api/'
# login to get a SID
dataj = {"jsonrpc":"2.0","id":"69","method":"call","params":["session","login",{"username":"admin","password":"admin"}]}
r = requests.post(baseuri + ori_sid , json=dataj)
@luisfcorreia
luisfcorreia / slurpRtp.py
Created August 3, 2017 19:12
beautiful rtp
from bs4 import BeautifulSoup
import urllib2
import sys
url = sys.argv[1]
page = urllib2.urlopen(url)
soup = BeautifulSoup(page,'lxml')
episodios = soup.find_all("a", class_="article-link")
for link in episodios:
import os, time
import glob
#get current Folder
folder = os.getcwd()+'/'
print 'Using pictures from ' + folder
fileFormats = ['JPG','jpg', 'MOV', 'mov', 'PNG', 'png', 'mp4', 'MP4', '3gp', 'jpeg'];
months = ['January','February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
picPath = []
/*
Example code to get a MCP3*08 running with an ESP8266
for DiY energy monitoring solutions
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "MCP3208.h"
const char* ssid = "...";
const char* host = "...";

vim /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then, save and activate the configuraiton.

Start here:

DISCLAIMER!

These instructions are correct as of April 1st 2016

Start by flashing a SD card with the latest Raspbian Jessie Lite image. You can get it from Raspberry Pi website

Do this in your Raspberry Pi as 'pi' user