Skip to content

Instantly share code, notes, and snippets.

View 24Ryou's full-sized avatar
🪐
always learning....

ali 24Ryou

🪐
always learning....
View GitHub Profile
<?php
/* -------------------------------- functions ------------------------------- */
// get backup of tabels in database PDO
function backup_tables($DBH, $tables) {
$DBH->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL);
//Script Variables
$compression = false;
<?php
// why PDO
// PDO provides a data-access abstraction layer
// PDO does not provide a database abstraction -->
// Full Structure of PDO
// PDO {
// __construct ( string $dsn [, string $username [, string $password [, array $driver_options ]]] )
// bool beginTransaction ( void )
// bool commit ( void )
// "dependencies": {
// "axios": "^0.27.2",
// "cheerio": "^1.0.0-rc.12",
// "dotenv": "^16.0.1",
// "twilio": "^3.78.0"
// }
// need a .env file with:
// TWILIO_ACCOUNT_SID = "your account sid";
@24Ryou
24Ryou / laravel_xampp_setup.md
Last active July 4, 2022 13:08 — forked from bradtraversy/laravel_xampp_setup.md
Laravel Xampp setup on Mac and Windows

Laravel Xampp Setup (Windows & Mac)

Install Xampp

Install Xampp from https://www.apachefriends.org/index.html

  • Run the Xampp installer and open the Xampp control panel
  • Make sure that you enable the Apache and MySQL services
  • On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder

Install Composer

Chrome Flags Backup

goto chrome://flags/ the press f12 and paste code then run backup() or restore()

function saveFile(filename, data) {
  return new Promise(resolve => {
    const blob = new Blob([data], { type: 'octet/stream' });
    const url = window.URL.createObjectURL(blob);
    const dom = document.createElement('a');

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

Heading

H1

H2

H3

Bold

bold text