Skip to content

Instantly share code, notes, and snippets.

View Asyraf-wa's full-sized avatar

Asyraf Asyraf-wa

View GitHub Profile
@Asyraf-wa
Asyraf-wa / qrcode.php
Created June 23, 2025 02:45
this script is used to create a QR code in PDF using CakePHP 5
<?php
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
$generator = new QRCode($_REQUEST['d'], $_REQUEST);
$generator->output_image();
exit(0);
}
class QRCode
{
private $data;
@Asyraf-wa
Asyraf-wa / class.cpp
Created November 22, 2023 13:20
Menu for C++
#include <iostream>
using namespace std;
void trainTicketKiosk();
void commissionCalculator();
void rockyLaundrySystem();
void teddyChildcare();
void aboutMe();
void menu();
//IF Else
#include <iostream>
using namespace std;
int main() {
int number;
cout << "Enter an integer: ";
cin >> number;
#include <iostream>
#include<cstring>
using namespace std;
class GPA {
private:
double creditH[25]; // Store the credit hours of student
string grade; // variable for storing the grade of student in string variable
string gradeList[20]; // To get the list of grades
double gpa;
#include <iostream>
#include <vector>
#include <string>
#include <stdlib.h>
#include <fstream>
using namespace std;
void ShowList(std::vector<std::string>& List);
void AddToList(std::vector<std::string>& List);
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
</head>
<body>
<button onclick="getLocation()">Get My Location</button>
<p id="location"></p>
@Asyraf-wa
Asyraf-wa / xampp_php7_xdebug.md
Created March 10, 2020 23:43 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@Asyraf-wa
Asyraf-wa / test.php
Created November 26, 2018 01:38
Asyraf-wa
//capture by session
if ($this->request->is('post')) {
$this->Session->write('name', $this->request->data['Department']['name']);
//read session
<?php echo $this->Session->read('name'); ?>
<?php echo $this->Form->input('name2', array('class' => 'form-control',
'value' => $this->Session->read('name')));?>
@Asyraf-wa
Asyraf-wa / meta-tags.md
Created April 20, 2018 13:11 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@Asyraf-wa
Asyraf-wa / morphext.ctp
Created December 30, 2016 09:35
Text Rotator (morphext)
//load animate, morphtext css and js
<?php
echo $this->Html->css('animate');
echo $this->Html->css('morphext');
echo $this->Html->script('morphext.min.js');
?>
...It is <span id="js-rotating">Good, Fast, Nice</span> to be used...
<script>