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
@ugik
ugik / convnet tflearn example
Last active April 13, 2017 03:10
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 / gist:44e4b3cc546fa2913cf200e34fa5da02
Created June 1, 2017 18:11
Converting an Existing Table to Innodb
ALTER TABLE table_name ENGINE=InnoDB;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Off Canvas Reveal Menu Template for Bootstrap</title>
https://support.cloudflare.com/hc/en-us/requests
https://support.cloudflare.com/hc/en-us/requests/new
@dovidezra
dovidezra / ERR_SOCKET_NOT_CONNECTED
Last active July 13, 2017 23:09
ERR_SOCKET_NOT_CONNECTED
1. Go to the start menu
2. Go to your browser
3. Click on it and open it up
4. Type this following command in the browsers address bar. This is the same place you normally type in https://www.mydomain.com
chrome://net-internals/#sockets
5. Click “Flush Socket Pools”, located at the Top of the screen.
6. Restart browser
@dovidezra
dovidezra / ERR_EMPTY_RESPONSE
Last active July 15, 2017 23:54
Fix ERR_EMPTY_RESPONSE by using CMD
Go to START MENU
Go to RUN
Type CMD
Run below 6 commands one by one. Copy and paste them one by one into CMD and click ENTER after adding each.
(In CMD, you just have to click with your right mouse button to paste)
ipconfig /release
ipconfig /all
ipconfig /flushdns
@dartiss
dartiss / functions.php
Created November 15, 2017 18:15
WordPress Plugin to List all Site Cookies
<?php
function get_cookies( $paras = '', $content = '' ) {
if ( strtolower( $paras[ 0 ] ) == 'novalue' ) { $novalue = true; } else { $novalue = false; }
if ( $content == '' ) { $seperator = ' : '; } else { $seperator = $content; }
$cookie = $_COOKIE;
ksort( $cookie );
@dovidezra
dovidezra / otp-auth.php
Last active December 24, 2017 18:41
(OTP-Auth) Easily Create One-Time Password System in PHP App
<?php
/**
* Name: (OTP-Auth) One-Time Password Authentication
* Auth: Jason Jersey
* Date: 12-24-2017
* Link: https://gist.github.com/icryptix/130fa81ca15925b8553bec8700e5813d
*/
/* Verifying whether OTP 1 hour cookie is set */
if(isset($_COOKIE["sitename_otp_cookie"])){