This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if(!isset($_SESSION['val'])){ | |
exec("gpio -g mode 18 pwm && gpio pwm-ms && gpio pwmc 192 && gpio pwmr 2000"); | |
} | |
function inicio(){ | |
exec('gpio -g pwm 18 240'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if(!isset($_SESSION['val'])){ | |
exec("gpio -g mode 18 pwm && gpio pwm-ms && gpio pwmc 192 && gpio pwmr 2000"); | |
} | |
function giraMotor(){ | |
exec('gpio -g pwm 18 60'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://js.pusher.com/4.3/pusher.min.js"></script> | |
<script> | |
// Enable pusher logging - don't include this in production | |
Pusher.logToConsole = true; | |
var pusher = new Pusher('18d514638e535062bd73', { | |
cluster: 'us2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="jquery-3.3.1.min.js"></script> | |
</head> | |
<body style="margin:0px; padding:0px"> | |
<video autoplay> | |
<source src="coke.mp4" type="video/mp4"> | |
</video> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$setmode17 = shell_exec("/usr/local/bin/gpio -g mode 17 out"); | |
$gpio_on = shell_exec("/usr/local/bin/gpio -g write 17 1"); | |
?> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$setmode17 = shell_exec("/usr/local/bin/gpio -g mode 17 out"); | |
$gpio_off = shell_exec("/usr/local/bin/gpio -g write 17 0"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo 'oi'; | |
require __DIR__ . '/vendor/autoload.php'; | |
$options = array( | |
'cluster' => 'us2', | |
'useTLS' => true | |
); | |
$pusher = new Pusher\Pusher( | |
'18d514638e535062bd73', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Implementing a JavaScript queue using an array | |
* English > https://www.javascripttutorial.net/javascript-queue/ | |
* Portugues > https://medium.com/@ricardoreis_22930/queue-fila-9a7cf32c1132 | |
*/ | |
function Queue(){ | |
this.elements = [] | |
} | |
// enqueue method adds an element at the end of the queue | |
Queue.prototype.enqueue = function (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Syntax: | |
* Deleting elemts | |
* Array.splice(position, num); | |
* | |
* Inserting elements | |
* Array.splice(position, 0, new_element_1, new_element_2, ...); | |
*/ | |
let colors = ['red','green','blue']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
echo '<br>token: ' . $token = isset( $_POST[ 'token' ] ) ? $_POST[ 'token' ] : ''; | |
echo '<br>'; | |
if ( empty( $_SESSION[ "cpf" ] ) ) { |
OlderNewer