Skip to content

Instantly share code, notes, and snippets.

alhoseany alhoseany

Block or report user

Report or block alhoseany

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View admin-logo.php
<?php
// CUSTOM ADMIN LOGIN HEADER LOGO
function my_custom_login_logo() {
echo '<style type="text/css"> h1 a { background-image:url('.get_bloginfo('template_directory').'/images/democratic-post-logo-google.jpg) !important; } </style>';
}
add_action('login_head', 'my_custom_login_logo');
// Die URL des Logos auf die eigene Website zeigen lassen
function gp_change_login_page_url($login_header_url) {
@alhoseany
alhoseany / index.html
Last active Sep 5, 2016 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
View index.html
<!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>
@alhoseany
alhoseany / arabic-country-dropdown-list.html
Last active Jun 3, 2016 — forked from AmrMekkawy/arabic-country-dropdown-list.html
Arabic countries HTML "select" element (dropdown list)
View arabic-country-dropdown-list.html
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- >
<select name="country">
<option value="AW">آروبا</option>
<option value="AZ">أذربيجان</option>
<option value="AM">أرمينيا</option>
<option value="ES">أسبانيا</option>
<option value="AU">أستراليا</option>
<option value="AF">أفغانستان</option>
<option value="AL">ألبانيا</option>
<option value="DE">ألمانيا</option>
@alhoseany
alhoseany / functions.php
Last active Apr 13, 2016
Redirect Buddypress profile edit screen to custom wordpress page
View functions.php
add_action('xprofile_screen_edit_profile', 'redirect_to_account_setup');
function redirect_to_account_setup(){
wp_redirect( get_permalink( get_page_by_path( 'account-setup' ) ) );
}
@alhoseany
alhoseany / gist:d11b9bab4642a5db022b
Last active Aug 29, 2015
get time difference in milliseconds
View gist:d11b9bab4642a5db022b
function find_time_diff($t1, $t2, $ms=false) {
$time1_pcs = explode(":", $t1);
$time1_pcs2 = explode(".", $time1_pcs[2]);
$time2_pcs = explode(":", $t2);
$time2_pcs2 = explode(".", $time2_pcs[2]);
$time1_all_ms = ($time1_pcs[0] * 60 * 60 * 1000) + ($time1_pcs[1] * 60 * 1000) + ($time1_pcs2[0] * 1000) + $time1_pcs2[1];
$time2_all_ms = ($time2_pcs[0] * 60 * 60 * 1000) + ($time2_pcs[1] * 60 * 1000) + ($time2_pcs2[0] * 1000) + $time2_pcs2[1];
$time1_all_ms_dif = $time2_all_ms - $time1_all_ms;
View PHP Countries Array
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island
You can’t perform that action at this time.