A Pen by Edward Lance Lorilla on CodePen.
This file contains hidden or 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
| CREATE TABLE `countries` ( | |
| `country_code` varchar(2) NOT NULL default '', | |
| `country_enName` varchar(100) NOT NULL default '', | |
| `country_arName` varchar(100) NOT NULL default '', | |
| `country_enNationality` varchar(100) NOT NULL default '', | |
| `country_arNationality` varchar(100) NOT NULL default '', | |
| PRIMARY KEY (`country_code`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
| -- | |
| -- Dumping data for table `countries` |
This file contains hidden or 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
| /** | |
| * Provide query string like ?test-mode=1 OR ?test-mode=0 | |
| **/ | |
| if ( isset( $_GET ) && isset( $_GET['test-mode'] ) ) { | |
| $_SESSION['test-mode'] = $_GET['test-mode']; | |
| } | |
| function isTestMode() { | |
| return $_SESSION['test-mode']; | |
| } |
This file contains hidden or 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
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
| /** | |
| * Dump helper. Functions to dump variables to the screen, in a nicley formatted manner. | |
| * @author Joost van Veen | |
| * @version 1.0 | |
| */ | |
| if (!function_exists('dump')) { | |
| function dump ($var, $label = 'Dump', $echo = TRUE) | |
| { | |
| // Store dump in variable |
This file contains hidden or 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
| /** | |
| * jQuery zdelete plugin v1.0 | |
| * | |
| * Copyright 2012, Muhammad Khalil (zarpio) | |
| * https://www.facebook.com/buddyforever | |
| * | |
| * Free to use and abuse under the MIT license. | |
| * http://www.opensource.org/licenses/mit-license.php | |
| */ |
This file contains hidden or 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> | |
| <title>Counter</title> | |
| <style type="text/css"> | |
| #show_counter { | |
| border: solid 1px #ccc; | |
| width: 200px; | |
| height: 50px; | |
| line-height: 50px; | |
| display: block; |
This file contains hidden or 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
| /* Copying rows in MySQL */ | |
| CREATE TEMPORARY TABLE temp_table | |
| AS | |
| SELECT * FROM source_table WHERE id='15'; | |
| UPDATE temp_table SET id='999' WHERE id='15'; | |
| INSERT INTO source_table SELECT * FROM temp_table; | |
| DROP TEMPORARY TABLE temp_table; |
This file contains hidden or 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
| <button onclick="history.go(-1);">Back</button> |
NewerOlder