Skip to content

Instantly share code, notes, and snippets.

View zarpio's full-sized avatar

Khalil zarpio

View GitHub Profile
@zarpio
zarpio / countries_nationalities_arabic_english.sql
Created January 26, 2021 09:10 — forked from FlavaSava7/countries_nationalities_arabic_english.sql
SQL Countries & Nationalities List : English and Arabic
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`
/**
* 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'];
}
@zarpio
zarpio / maintenance.html
Last active October 15, 2021 13:06 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!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>
@zarpio
zarpio / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?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
@zarpio
zarpio / zdelete.jquery.js
Created May 8, 2012 20:27
jQuery Plugin
/**
* 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
*/
@zarpio
zarpio / gist:2215904
Created March 27, 2012 13:34
Zarpio Counter with jQuery
<html>
<head>
<title>Counter</title>
<style type="text/css">
#show_counter {
border: solid 1px #ccc;
width: 200px;
height: 50px;
line-height: 50px;
display: block;
@zarpio
zarpio / gist:2169213
Created March 23, 2012 10:05
mysql quries
/* 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;
@zarpio
zarpio / gist:2139310
Created March 20, 2012 18:28
Button having history
<button onclick="history.go(-1);">Back</button>