Nissan 350Z
Circuit Jules Tacheny Mettet
8 x 25 mins
#!/usr/bin/env python3 | |
import time | |
def export_gpio(num): | |
with open('/sys/class/gpio/export', 'w') as e: | |
e.write(str(num)) | |
def unexport_gpio(num): | |
with open('/sys/class/gpio/unexport', 'w') as e: |
using System.Security.Cryptography.X509Certificates; | |
using MQTTnet; | |
using MQTTnet.Client; | |
const string eventGridUrl = "<resource>.ts.eventgrid.azure.net"; | |
const string deviceId = "test-device-01"; | |
const string clientCertFile = "test-device-01.crt"; | |
const string clientKetFile = "test-device-01.key"; |
void print_triangle(unsigned char width) | |
{ | |
unsigned char rows = (width + 1) / 2; | |
for (unsigned char i = 0; i < rows; i++) | |
{ | |
for(unsigned char j = 0; j < rows-i-1; j++) | |
{ | |
printf(" "); | |
} | |
for(unsigned char k = 0; k < (i*2)+1; k++) |
#!/usr/bin/env python3 | |
# pierre - papier - ciseau | |
# 2 joueurs | |
# input des noms | |
# n parties jouées | |
import random | |
choices = ["paper", "rock", "scissor"] |
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="300" height="100" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
var c = document.getElementById("myCanvas"); | |
var ctx = c.getContext("2d"); |
#include <stdio.h> | |
#include <stdint.h> | |
static void shellSort(uint8_t* a, size_t n) | |
{ | |
uint8_t t; | |
size_t h = n, i, j; | |
while(h /= 2) | |
{ | |
for(i = h; i < n; i++) |
#!/usr/bin/env node | |
const nodemailer = require("nodemailer"); | |
let smtpConfig = { | |
host: 'smtp.gmail.com', | |
port: 587, | |
secure: false, // upgrade later with STARTTLS | |
auth: { | |
user: '[email protected]', |
# list lvm partitions | |
sudo lvmdiskscan | |
sudo lvdisplay | |
# mount lvmgroup/lvmvol | |
sudo mount /dev/<VolGroup00?>/<LogVol00?> /mnt # /dev/VG_Name/LV_Name | |
# check if lvm used by vm | |
virsh list | |
virsh edit <vm name> # look for device='disk' |
# setup | |
apt install qemu-kvm libvirt-bin virtinst bridge-utils | |
# modify /etc/network/interfaces (replace eth0 with br0) | |
auto br0 | |
iface br0 inet static | |
address 192.168.0.10 | |
network 192.168.0.0 | |
netmask 255.255.255.0 |