Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am emanualjade on github.
  • I am emanualjade (https://keybase.io/emanualjade) on keybase.
  • I have a public key ASDrMupVYVDhT8HP0QHW_75jRGydjQu7FECYdSl4uuRANwo

To claim this, I am signing this object:

@emanualjade
emanualjade / SearchConcept.js
Last active August 22, 2018 23:39
SearchConcept
// CLIENT SIDE
// search terms will look like
// www.apifini.com, apifini.com, dev.apifini.com, www.dev.apifini.com etc
// First search on host
const host = window.location.host
// If the host search has no results we can do a full url search on the social fields
const fullUrlWithoutParamsOrHash = window.location.origin + window.location+pathname
// passing multiple terms is just a concept. We could just pass the URL and let all the splitting etc be handled on the server
//=====================
// Palindrome
//=====================
function removeSpecialChars(str){
return str.replace(/[^A-Z0-9]/ig, "");
}
function lowerCase(str){
return str.toLowerCase();
}
@emanualjade
emanualjade / gist:032681cfb5df09705d44
Created April 6, 2015 14:59
Add custom user fields to wordpress
function custom_user_profile_fields($user){
if(is_object($user))
$company = esc_attr( get_the_author_meta( 'company', $user->ID ) );
else
$company = null;
?>
<h3>Extra profile information</h3>
<table class="form-table">
<tr>
<th><label for="company">Company Name</label></th>
@emanualjade
emanualjade / index.html
Created June 26, 2013 07:15
A CodePen by Emanual Jade. 3D Nav Cube - Inspired by snowbird.com mobile site. This is meant to be used as a responsive case for smaller mobile devices. This is a quick and dirty test and not ready for use in production.
<div class="page">
<div class="cube-container">
<div class="cube nav-cube">
<div class="search">
<p>Search</p>
<input type="text"/>
</div>
<ul>
<li><a href="">yachts</a></li>
@emanualjade
emanualjade / index.html
Created June 26, 2013 07:14
A CodePen by Emanual Jade. IOS7 Parallax Background - Hover over image for effect. A little experiment. Inspired by the iOS7 Parallax background. Simulating that effect using css transitions and transforms.
<div id="page">
<div class="display">
<img src="http://s.cdpn.io/49110/3312220585_ca1d28b908_o.jpg" />
<div class="icons">
<div class="icon right top"></div>
<div class="icon right"></div>
<div class="icon left"></div>
<div class="icon left"></div>