Skip to content

Instantly share code, notes, and snippets.

View maxangelo987's full-sized avatar
:octocat:
Focusing

Max Angelo Dapitilla Perin maxangelo987

:octocat:
Focusing
View GitHub Profile
@maxangelo987
maxangelo987 / qr_login.php
Created August 11, 2023 05:47
qr_login.php
//if user click login button
if(isset($_POST['login'])){
$email = mysqli_real_escape_string($con, $_POST['email']);
$password = mysqli_real_escape_string($con, $_POST['password']);
$check_email = "SELECT * FROM users WHERE email = '$email'";
$res = mysqli_query($con, $check_email);
if(mysqli_num_rows($res) > 0){
$fetch = mysqli_fetch_assoc($res);
$fetch_pass = $fetch['password'];
if(password_verify($password, $fetch_pass)){
@maxangelo987
maxangelo987 / sp_add_admins.sql
Created February 17, 2023 02:46
sp_add_admins.sql
DELIMITER $$
USE `bisu_contact_tracer`$$
DROP PROCEDURE IF EXISTS `sp_add_admins`$$
CREATE DEFINER=`root`@`%` PROCEDURE `sp_add_admins`(
IN _fullname VARCHAR(255),
IN _gender VARCHAR(255),
IN _office VARCHAR(255),
@maxangelo987
maxangelo987 / raspi_light_an_led.js
Created April 5, 2022 18:28
Ligthing an led using Raspberry Pi
var Gpio = require("onoff").Gpio;
var led = new Gpio(4, "out");
var x = 0;
while(true)
{
// always make sure to update something in your condition
// so you dont fall into an infinite loop
console.log("Blinking");
sleep(1000);
led.writeSync(1);
@maxangelo987
maxangelo987 / Input_Adding_Concatenate_Return_String.php
Last active May 11, 2021 14:48
Input_Adding_Concatenate_Return_String.php
<?php declare(strict_types=1); // strict requirement
function location(int $a, int $b, int $c, int $d) {
// Insert Formula Here
$x = $c + $d;
$y = $a + $b;
$output = "O: Finance, X: ".$x.", Y: ".$y;
return $output;
}
echo location(1, 1, 2, 2);
#include<iostream>
#include<fstream>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
using namespace std;
int isKeyword(char buffer[]){
char keywords[32][10] = {"auto","break","case","char","const","continue","default",
@maxangelo987
maxangelo987 / 0_reuse_code.js
Last active September 22, 2016 16:16
Here are some things you can do with Gists in GistBox.
404: Not Found