Skip to content

Instantly share code, notes, and snippets.

View dovidezra's full-sized avatar
💭
I may be slow to respond.

Dovid Ezra dovidezra

💭
I may be slow to respond.
  • Diaspora
View GitHub Profile
@dovidezra
dovidezra / first_names.php
Created November 9, 2016 01:53 — forked from brysonian/first_names.php
list of first names formatted as a PHP array
<?php
$names = array(
'Allison',
'Arthur',
'Ana',
'Alex',
'Arlene',
'Alberto',
'Barry',
@dovidezra
dovidezra / last_names.php
Created November 9, 2016 01:53 — forked from subodhghulaxe/last_names.php
List of last names in php array
<?php
$last_names = array(
'Abbott',
'Acevedo',
'Acosta',
'Adams',
'Adkins',
'Aguilar',
'Aguirre',
'Albert',
@dovidezra
dovidezra / CitiesArray.php
Created November 9, 2016 01:58 — forked from jonathonbyrdziak/CitiesArray.php
Cities Array :: An array of USA cities, as of April 2010
array(
'ALABAMA'=>
array('ABBEVILLE','ADAMSVILLE','ADDISON','AKRON','ALABASTER','ALBERTVILLE','ALEXANDER CITY','ALEXANDRIA','ALICEVILLE','ALLGOOD','ALTOONA','ANDALUSIA','ANDERSON','ANNISTON','ARAB','ARDMORE','ARGO','ARITON','ARLEY','ASHFORD','ASHLAND','ASHVILLE','ATHENS','ATMORE','ATTALLA','AUBURN','AUTAUGAVILLE','AVON','BABBIE','BAILEYTON','BANKS','BAY MINETTE','BAYOU LA BATRE','BEAR CREEK','BEATRICE','BEAVERTON','BELK','BENTON','BERRY','BESSEMER','BILLINGSLEY','BIRMINGHAM','BLACK','BLOUNTSVILLE','BLUE MOUNTAIN','BLUE RIDGE','BLUE SPRINGS','BOAZ','BOLIGEE','BON AIR','BRANCHVILLE','BRANTLEY','BRENT','BREWTON','BRIDGEPORT','BRIGHTON','BRILLIANT','BROOKSIDE','BROOKWOOD','BRUNDIDGE','BUTLER','BYNUM','CAHABA HEIGHTS','CALERA','CAMDEN','CAMP HILL','CARBON HILL','CARDIFF','CAROLINA','CARROLLTON','CASTLEBERRY','CEDAR BLUFF','CENTER POINT','CENTRE','CENTREVILLE','CHALKVILLE','CHATOM','CHELSEA','CHEROKEE','CHICKASAW','CHILDERSBURG','CITRONELLE','CLANTON','CLAY','CLAYHATCHEE','CLAYTON','CLEVELAND','CLIO','COALING',
@dovidezra
dovidezra / custom-domain-localhost-xampp
Created February 16, 2017 08:34 — forked from oozman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onwards are pretty much applicable on other operating system.
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
=============
127.0.0.1 your.domain.com
=============
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
@dovidezra
dovidezra / convnet tflearn example
Created April 13, 2017 03:10 — forked from ugik/convnet tflearn example
convolutional tflearn example
# Building convolutional network
network = input_data(shape=[None, 28, 28, 1], name='input')
network = conv_2d(network, 32, 3, activation='relu', regularizer="L2")
network = max_pool_2d(network, 2)
network = local_response_normalization(network)
network = conv_2d(network, 64, 3, activation='relu', regularizer="L2")
network = max_pool_2d(network, 2)
network = local_response_normalization(network)
network = fully_connected(network, 128, activation='tanh')
network = dropout(network, 0.8)
@dovidezra
dovidezra / gist:4a86a872d72db398d29774a0d97cf746
Created April 20, 2017 07:14
function to fetch description of a keyword from wikipedia. http://stackoverflow.com/a/13132388
function getDescription($keyword){
$url='http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryString='.urlencode($keyword).'&MaxHits=1';
$xml=simplexml_load_file($url);
return $xml->Result->Description;
}
echo getDescription('agra');
@dovidezra
dovidezra / google-search-autocomplete-cdn.html
Last active April 17, 2018 03:03
CDN hosted jQuery based Autocomplete script with Millions of Suggestions. Details: https://knowledgebasehub.com
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- jQuery Required Library -->
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.x-git.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<!-- Our CDN Hosted Script -->
<script type="text/javascript" src="https://sitecolo.github.io/knowledgebasehub/web/web-en.js"></script>
@dovidezra
dovidezra / youtube-search-autocomplete-cdn.html
Last active April 17, 2018 03:04
CDN hosted jQuery based Autocomplete script with Millions of Suggestions. Details: https://knowledgebasehub.com
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- jQuery Required Library -->
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.x-git.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<!-- Our CDN Hosted Script -->
<script type="text/javascript" src="https://sitecolo.github.io/knowledgebasehub/youtube/yt-en.js"></script>
@dovidezra
dovidezra / google-autocomplete.js
Created June 1, 2017 02:48
CDN hosted jQuery based Autocomplete script with Millions of Suggestions. Details: https://knowledgebasehub.com
var KnowledgebaseHub;
$(document).ready(function () {
$("#search").autocomplete({
source: function(request, response) {
$.getJSON("https://suggestqueries.google.com/complete/search?callback=?",
{
"hl":"en", // "en" is english. see documentation for more languages
"ds":"", // Force youtube suggestions, use "yt"
"jsonp":"KnowledgebaseHub", // jsonp callback function name
"q":request.term, // search term
@dovidezra
dovidezra / gist:44e4b3cc546fa2913cf200e34fa5da02
Created June 1, 2017 18:11
Converting an Existing Table to Innodb
ALTER TABLE table_name ENGINE=InnoDB;