Skip to content

Instantly share code, notes, and snippets.

View iqbalrony's full-sized avatar
🏠
Working from home

Iqbal Hossain Rony iqbalrony

🏠
Working from home
View GitHub Profile
@DHS
DHS / PHP Countries Array
Created November 4, 2011 18:51
PHP array of all country names
<?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
@jefferyrdavis
jefferyrdavis / gist:5992218
Last active September 20, 2022 08:10
Snippit: PHP: Detect User Location by IP (Returns City and State)
<?php
// returns "City, State" if found otherwise defaults to "Unkown Location"
function detect_city($ip) {
$default = 'Unkown Location';
if (!is_string($ip) || strlen($ip) < 1 || $ip == '127.0.0.1' || $ip == 'localhost')
$ip = '8.8.8.8';
$curlopt_useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)';
@Balamir
Balamir / get_os_and_browser.php
Created October 7, 2016 12:50
PHP: get user os and browser information
<?php
/**
* Kullanicinin kullandigi isletim sistemi bilgisini alir.
*
* @since 2.0
*/
function getOS() {
$user_agent = $_SERVER['HTTP_USER_AGENT'];
@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active July 11, 2024 18:24
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

@devAsadNur
devAsadNur / most-useful-terminal-command-list.txt
Last active September 15, 2020 12:29
A list of most used terminal command list.
=======================================================================
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//////////////// Most Useful Terminal Command List \\\\\\\\\\\\\\\\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=======================================================================
01. Current Working Directory:
@sayedulsayem
sayedulsayem / Elementor group control default value.php
Last active October 7, 2021 07:51
Elementor group control default value
<?php
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'content_typography',
'fields_options' => [
'typography' => [
'default' => 'yes'
],