Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
Choose a ticket class: <select id="tickets"></select> | |
<p id="ticketOutput"></p> | |
<script id="ticketTemplate" type="text/x-jquery-tmpl"> | |
{{if chosenTicket}} | |
You have chosen <b>${ chosenTicket().name }</b> | |
($${ chosenTicket().price }) | |
<button data-bind="click: resetTicket">Clear</button> | |
{{/if}} |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
/** | |
* Make a X-Domain request to url and callback. | |
* | |
* @param url {String} | |
* @param method {String} HTTP verb ('GET', 'POST', 'DELETE', etc.) | |
* @param data {String} request body | |
* @param callback {Function} to callback on completion | |
* @param errback {Function} to callback on error | |
*/ | |
function xdr(url, method, data, callback, errback) { |
function cssLoaded(href) { | |
var cssFound = false; | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
sheet = document.styleSheets[i]; | |
if (sheet['href'].indexOf(href) >= 0 && sheet['cssRules'].length > 0) { | |
cssFound = true; | |
} | |
}; |
Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.
brew install memcached
/Applications/MAMP/bin/php/[php version folder]/include/php
./Applications/MAMP/bin/php/[php version folder]/include/php/configure
/Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache
.zip_code | city | |
---|---|---|
11000 | Beograd | |
11010 | Beograd Vozdovac | |
11030 | Beograd Čukarica | |
11050 | Beograd Zvezdara | |
11060 | Beograd Palilula | |
11070 | Novi Beograd | |
11080 | Beograd Zemun | |
11090 | Beograd Rakovica | |
11130 | Kaluđerica |
Osnovni URL | |
----------- | |
http://www.nbs.rs/rir_pn/pn_rir.html.jsp?type=rir_results&lang=SER_CIR&konverzija=yes& | |
Moguća pretrga po | |
----------------- | |
-------------------------------------------- | |
| Podatak | ključ | | |
-------------------------------------------- |