Skip to content

Instantly share code, notes, and snippets.

View lefuturiste's full-sized avatar
📜
A lot of things going on at the same time!

Le_Futuriste lefuturiste

📜
A lot of things going on at the same time!
View GitHub Profile
import struct
import asyncio
class Mouse:
position = [0, 0]
def getMouseDelta(self):
buf = self.file.read(3)
@lefuturiste
lefuturiste / wpa_supplicant.conf
Created April 10, 2019 12:26
wpa supplicant conf template for raspbian
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=FR
network={
ssid="ssid"
psk="password"
key_mgmt=WPA-PSK
}
https://prod.liveshare.vsengsaas.visualstudio.com/join?F659ADF1065275DD211CD2D83DC945206F0C
@lefuturiste
lefuturiste / HttpServer.java
Created April 26, 2019 15:51
[WIP] Simple HTTP Server in java
package fr.lefuturiste.urlshortner;
import org.json.*;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
Install-Linux-tar.txt
LICENSE.txt
build.txt
NOTICE.txt
license/
license/antlr4-runtime-4.5.3.jar-NOTICE
license/google-api-services-mobilesdk-v1.jar-NOTICE
license/google-api-services-source.jar-NOTICE
license/hdrhistogram_license.txt
license/XStream_license.txt
#include <Wire.h>
#include <SPI.h>
#include "Lel.h"
// If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (52)
#define PN532_MOSI (51)
#define PN532_SS (20) // connected to the SDA pin of the MegaPi ie digital pin 20
#define PN532_MISO (50)
// disclaimer:
// code pas parfait
#include "MeMegaPi.h"
#include <Wire.h>
#include <SPI.h>
#include "Lel.h"
// If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (52)
// disclaimer:
// code pas parfait
#include "MeMegaPi.h"
#include <Wire.h>
#include <SPI.h>
#include "Lel.h"
// If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (52)
from gpiozero import DigitalInputDevice
from time import sleep
# GPIO pin BCM 23 & 24 Both pulled up
phaseA = DigitalInputDevice(23, True)
phaseB = DigitalInputDevice(24, True)
counts = 0
state = (0, 0)
from gpiozero import DigitalInputDevice
# GPIO pin BCM 23 & 24 Both pulled up
phaseA = DigitalInputDevice(23, True)
phaseB = DigitalInputDevice(24, True)
counts = 0
state = (0, 0)
oldState = (0, 0)