Skip to content

Instantly share code, notes, and snippets.

View varlen's full-sized avatar

Varlen Pavani Neto varlen

View GitHub Profile
@varlen
varlen / teste_vai_e_volta.ino
Created April 30, 2017 17:15
Teste para motor de passo, girando 50 passos num sentido depois 50 no sentido contrário
#include <Stepper.h>
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 2, 3, 4, 5);
int stepCount = 0; // number of steps the motor has taken
@varlen
varlen / form.php
Last active August 28, 2017 13:07
Exemplos para o Minicurso de Desenvolvimento Web
<?php
/**
* Formulário simples utilizando método POST
*/
?>
<!DOCTYPE html>
<html>
<head>
<title>Minha Página</title>
@varlen
varlen / README.md
Last active February 23, 2022 03:36
.NET - Por onde começar?
@varlen
varlen / midi_mapper.py
Created February 20, 2020 03:11
MIDI file mapper using Python
from mido import MidiFile, MidiFile, MidiTrack
# Abrindo o arquivo de origem
input_midi = MidiFile('./Murundu.mid')
# Criando o arquivo de destino e a nova faixa MIDI
output_midi = MidiFile()
# Mantendo o tempo (BPM) entre os arquivos
output_midi.ticks_per_beat = input_midi.ticks_per_beat
@varlen
varlen / tagger.py
Created September 6, 2020 16:10
Adiciona tags ID3 a partir do nome do arquivo
import glob, os, eyed3
#Lendo o diretorio atual
caminho = os.getcwd()
#Gerando a lista de arquivos mp3
playlist = glob.glob(caminho + "\\*.mp3")
print(str(len(playlist)) + " musicas encontradas.")
print(playlist)
#!/bin/bash
response=$(curl --write-out '%{http_code}' --silent --output /dev/null <address>)
if [ "$response" != "200" ]; then
reboot
fi