Skip to content

Instantly share code, notes, and snippets.

View alfintechcomputer's full-sized avatar
🎯
Focusing

AlfinTech Computer alfintechcomputer

🎯
Focusing
View GitHub Profile
@alfintechcomputer
alfintechcomputer / help_show.sql
Last active November 1, 2020 18:05
MySQL Introduction
Name: 'SHOW'
Description:
SHOW has many forms that provide information about databases, tables,
columns, or status information about the server. This section describes
those following:
SHOW AUTHORS
SHOW {BINARY | MASTER} LOGS
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count
SHOW CHARACTER SET [like_or_where]
@alfintechcomputer
alfintechcomputer / information_schema.sql
Last active November 1, 2020 18:06
MySQL Introduction
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
@alfintechcomputer
alfintechcomputer / schemata.sql
Last active November 1, 2020 18:07
MySQL Introduction
+----------------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------+--------------+------+-----+---------+-------+
| CATALOG_NAME | varchar(512) | NO | | | |
| SCHEMA_NAME | varchar(64) | NO | | | |
| DEFAULT_CHARACTER_SET_NAME | varchar(32) | NO | | | |
| DEFAULT_COLLATION_NAME | varchar(32) | NO | | | |
| SQL_PATH | varchar(512) | YES | | NULL | |
+----------------------------+--------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
@alfintechcomputer
alfintechcomputer / show_databases.sql
Last active November 1, 2020 18:07
MySQL Introduction
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| authdemo |
| blog |
| laratut |
| laravelblog |
| mysql |
@alfintechcomputer
alfintechcomputer / db_changed.sql
Last active November 1, 2020 18:08
MySQL Introduction
Database changed
@alfintechcomputer
alfintechcomputer / mysql_data_types.sql
Last active November 1, 2020 18:08
MySQL Introduction
+------------------------------------------------------------------+
| MySQL Data Types |
+------------------------------------------------------------------+
| Strings | VARCHAR, CHAR, TEXT |
| Date/time | DATE, TIME, YEAR, TIMESTAMP, DATETIME |
| Numbers | DECIMAL, INT |
| Lists | ENUM, SET |
+------------------------------------------------------------------+
@alfintechcomputer
alfintechcomputer / add_the_header_file.php
Last active November 1, 2020 18:11
WordPress Plugin
/**
* Plugin Name: Your Plugin Name
* Plugin URI: http://yourdomain.com
* Description: Insert a brief description of what your plugin does here.
* Version: 1.0.0
* Author: Your Name
* Author URI: http://yourdomain.com
* License: GPL2
*/
@alfintechcomputer
alfintechcomputer / index.php
Last active November 1, 2020 18:15
WordPress Excerpts
<?php
get_header();
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<article class="post">
<h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
<p class="post-meta"><?php the_time( 'F jS, Y' ); ?> | <a
@alfintechcomputer
alfintechcomputer / single.php
Last active November 1, 2020 18:17
WordPress Excerpts
<?php
get_header();
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<article class="post">
<h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
<p class="post-meta"><?php the_time( 'F jS, Y' ); ?> | <a
@alfintechcomputer
alfintechcomputer / index.php
Last active November 1, 2020 18:23
WordPress Excerpts adding ‘Read More’ links to […]
<?php
get_header();
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<article class="post">
<h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
<p class="post-meta"><?php the_time( 'F jS, Y' ); ?> | <a