Skip to content

Instantly share code, notes, and snippets.

View toddnestor's full-sized avatar

Todd D Nestor toddnestor

View GitHub Profile
<h2>Original: </h2>
<div id="original">http://0e24f87c32490a111f93f3579380e24d7f3579f.0e24f87c32490a1117f3579380e24f87c32490a111a3d7f3579f.0e24f87c32490a111f.0e24f87c32490a111f937ffffa3.0e24f82490af111f9f373d7f3579380e24f87c2490a111f937a3d7f3579f.tdneffsdsafstor.sometdhing.smarffffftmefsmbffff.com.uk/whaffdffffffffffffffffffsadffdsarg+whatev?he=that http://google.com/somewhere toddnestor.com yourmom.com google.com http://google.com somewhere.so whatever.sow.u whatever.sow.uk wow.wo https:something.com https://something.com //solid.online <img src="http://google.com" /> toddnestor.com, toddnestor.com. toddnestor.com: toddnestor.com? toddnestor.com!</div>
<h2>Linkified: </h2>
<div id="linkified"></div>
<script>
var linkify = function( string ) {
var re = /(?:^|\ )(((?:(?:http(?:s)?\:)?(?:\/\/))|(?:\/\/))?(?:(?=[a-z0-9\-\.]{1,255}(?=\/|\ |$|\:|\?|\,|\!))(?:(?:(?:[a-z0-9]{1}(?:[a-z0-9\-]{1,62})?\.){1,127})[a-z]{2,}(?:\.[a-z]{2})?))(?:[a-z0-9\/\-\_\%\?\&\!\$\'\,\(\)\*\+\=\;])*?)(?=$|\.(?=\ |$)|\:|\ |\?(?=\ |$)
@toddnestor
toddnestor / aweber_optin_form_js
Created September 10, 2015 19:22
JS version of aweber opt-in form
<div class="AW-Form-1143881060"></div>
<script type="text/javascript">(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//forms.aweber.com/form/60/1143881060.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "aweber-wjs-14oz0n6cd"));
</script>
@toddnestor
toddnestor / aweber_opt_in_html
Created September 10, 2015 19:21
HTML version of aweber opt in
<!-- AWeber Web Form Generator 3.0.1 -->
<style type="text/css">
#af-form-1143881060 .af-body .af-textWrap{width:98%;display:block;float:none;}
#af-form-1143881060 .af-body .privacyPolicy{color:#CCCCCC;font-size:10px;font-family:Tahoma, serif;}
#af-form-1143881060 .af-body a{color:#46B46C;text-decoration:underline;font-style:normal;font-weight:normal;}
#af-form-1143881060 .af-body input.text, #af-form-1143881060 .af-body textarea{background-color:#46B46C;border-color:#D9D9D9;border-width:1px;border-style:solid;color:#FFFFFF;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-family:Tahoma, serif;}
#af-form-1143881060 .af-body input.text:focus, #af-form-1143881060 .af-body textarea:focus{background-color:#46B46C;border-color:#030303;border-width:1px;border-style:solid;}
#af-form-1143881060 .af-body label.previewLabel{display:block;float:none;text-align:left;width:auto;color:#46B46C;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-fa
<?php
function PostInit()
{
if( !isset($_GET['dbfix']) )
return;
$this->Helper('tools')->remove_server_limits();
global $db;
@toddnestor
toddnestor / Reusable and flexible solution
Created January 24, 2014 20:16
The FizzBuzz problem
<?php
//I already posted this in response to another post, but I wanted to get it to where you all could see it
//classes which would typically be kept in separate files named htmlCode.class.php and numberFunctions.class.php respectively
class htmlCode
{
public function __construct()
{
@toddnestor
toddnestor / gist:8605330
Last active December 13, 2016 19:52
What PHP OOP can do...
<?php
//require prepend file
require('minicore/_conf/conf.php');
//Call for necessary class families from herccore
using ('System.Data');
using ('System.Validation');
//make class definitions