Skip to content

Instantly share code, notes, and snippets.

View mig1098's full-sized avatar

miglio esaud mig1098

View GitHub Profile
@mig1098
mig1098 / PHP-Interactive-CLI-Install-from-Source.md
Created March 20, 2018 04:33 — forked from christopher-hopper/PHP-Interactive-CLI-Install-from-Source.md
Install PHP from a source download to enable its interactive command-line shell interface on Linux.

PHP Interactive CLI Install

The following commands can be used to install PHP from source with an interactive command-line shell interface on Linux.

This interactive shell, (command: php -a) was the main reason I built from source to begin with. Now though I am able to play with the latest PHP versions as soon as they are available.

The commands below were written for and tested on the following system.

  • OS: Ubuntu 14.04.4 LTS (trusty)
@mig1098
mig1098 / kmskeys10.txt
Created February 20, 2018 14:16 — forked from CHEF-KOCH/kmskeys10.txt
Windows 10 KMS Keys
Windows.10.and.Office.2016.gVLK
#####################################################################
# Install/Uninstall keys #
#####################################################################
1.) Uninstall the current product by entering the “uninstall product key” extension:
slmgr.vbs /upk
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10”
@mig1098
mig1098 / originate_call.php
Created November 9, 2017 16:54 — forked from anpel/originate_call.php
Originate a call from Asterisk using PHP and Asterisk Manager Interface
/**
* Once this scipt is executed it will connect to the local port you have assigned to
* Asterisk (default: 5038) and send an authentication request. If successfull, it will
* send a second request to originate your call.
*
* The internal SIP line $internalPhoneline will be dialed, and when picked up the
* $target phone will be dialed using your outbound calls context ($context).
*
* Of course, you can modify the commands sent to the asterisk manager interface to suit your needs.
* you can find more about the available options at:
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@mig1098
mig1098 / array_tree_v2.php
Created September 14, 2016 16:59
using bootstrap css
<?php
function buildtree(&$result,$dropdown,$space='',$callback=null){
$drop = false;
if(!is_array($dropdown) || count($dropdown) < 1 ){ return false; }
$i = 0;
$space .= $space;
while($i < count($dropdown)){
$key = key($dropdown);
$item = ( is_numeric($key) ? $dropdown[$key] : $key );
$childexist = !empty($dropdown[$item]) && is_array($dropdown[$item]);
<?php
function buildtree(&$result,$dropdown,$space=' ',$bool=true){
if(!is_array($dropdown) || count($dropdown) < 1 ){ return false; }
$i = 0;
$space .= $bool ? $space : '';
while($i < count($dropdown)){
$key = key($dropdown);
$result .= $space;
$result .= ( is_numeric($key) ? $dropdown[$key] : $key );
$result .= '<br />';
var mg_brand={
ckname:'mgprod',
getCookie:function( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ';', len );
<style type="text/css"></style>
<div class="grid">
<div class="mg-mega-menu">
<ul class="nav-bar">
{% assign n_cols_nav = 0 %}
{% assign n_cols_nav_limit = linklists.main-menu.links.size | divided_by: 2 %}
{% for link in linklists.main-menu.links %}
{% assign n_cols_nav = n_cols_nav | plus: 1 %}
{% comment %} parent menu links {% endcomment %}
{% assign child_list_handle = link.title | handleize %}
@mig1098
mig1098 / Javascript ISO country code to country name conversion
Created March 28, 2016 16:25 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@mig1098
mig1098 / gist:326ec4c2b6e31984d52c
Created March 28, 2016 16:22 — forked from incredimike/variousCountryListFormats.js
Country list as javascript array (alphabetical)
// This needs tidied up before production TODO
var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua &amp; Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas"
,"Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia &amp; Herzegovina","Botswana","Brazil","British Virgin Islands"
,"Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica"
,"Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea"
,"Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana"
,"Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bis