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 / .htaccess
Last active March 7, 2023 13:19 — forked from keithmorris/.htaccess
CodeIgniter 3 htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenStreetMap &amp; OpenLayers - Marker Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<script src="https://openlayers.org/en/v4.6.5/build/ol.js" type="text/javascript"></script>
<script>
@dovidezra
dovidezra / honeypot-example.php
Created April 21, 2021 01:40 — forked from andrewlimaza/honeypot-example.php
Simple honeypot for an HTML form using PHP
<?php
//check if form was sent
if($_POST){
$to = 'some@email.com';
$subject = 'Testing HoneyPot';
$header = "From: $name <$name>";
$name = $_POST['name'];
@dovidezra
dovidezra / functions.php
Created December 7, 2020 17:31 — forked from dartiss/functions.php
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 / fakeigniter.php
Created September 10, 2019 06:48 — forked from tinkertim/fakeigniter.php
A fake Codeigniter framework for testing codeigniter-redis
<?php
error_reporting(E_ALL);
/**
* A 'fake' Codeigniter framework for testing codeigniter-redis
* I seriously wrote this because it was faster than setting up another CI install, so I can
* work on it without breaking stuff that other people are using.
* Written by Tim Post <tpost@ezp.net> I take no responsibility for what comes below!
**/
/* Provide some of the CI common functions */
@dovidezra
dovidezra / country-blocker.php
Created November 13, 2018 06:34
Small script used to block some countries (based on ipinfodb.com database)
<?php
/**
* Small script used to block some countries (based on ipinfodb.com database)
*
* @author @Heavenstar_ | alexis.chevalier1@gmail.com
* @version 1.0.0
*/
$apiKey = 'REPLACE WITH YOUR KEY'; //Get an API key here : http://ipinfodb.com/login.php
$apiEndpoint = 'http://api.ipinfodb.com/v3/ip-country/';
@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 / 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 / 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 / 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',