Skip to content

Instantly share code, notes, and snippets.

View jeremejazz's full-sized avatar

Jereme Causing jeremejazz

View GitHub Profile
<!-- Open Graph tags for your home page (index). -->
<meta property="og:site_name" content="{Title}" />
<meta property="fb:app_id" content="FACEBOOK_APPID"/>
<meta property="fb:admins" content="FACEBOOK_USERID" />
<meta property="og:description" content="{MetaDescription}" />
<meta property="og:locale" content="en_US" />
{block:IndexPage}
<meta property="og:image" content="{PortraitURL-128}" />
<meta property="og:title" content="{Title}" />
@jeremejazz
jeremejazz / polygonCenter.js
Last active February 22, 2021 21:19
Return Center polygon in google maps v3. This does not apply to some shapes though. I recommend using turf.js instead https://turfjs.org/
function polygonCenter(poly) {
var lowx,
highx,
lowy,
highy,
lats = [],
lngs = [],
vertices = poly.getPath();
for(var i=0; i<vertices.length; i++) {
@jeremejazz
jeremejazz / proCrypt.php
Created May 12, 2014 03:52
PHP Two Way Encryption Class
<?php
class proCrypt
{
/**
*
* This is called when we wish to set a variable
*
* @access public
* @param string $name
* @param string $value
@jeremejazz
jeremejazz / swap.php
Created June 20, 2014 01:21
Swap two integers without 3rd integer
<?php
a = 10;
b = 20;
a = a + b; // a = 30
b = a - b; // b = 10
a = a - b; // a = 20
@jeremejazz
jeremejazz / designer.html
Created September 12, 2014 03:19
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@jeremejazz
jeremejazz / .htaccess
Created October 20, 2014 02:38
Codeigniter assets helper
RewriteEngine on
RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
@jeremejazz
jeremejazz / MediaElementJS-Custom-Playlist.markdown
Created December 17, 2014 07:26
MediaElementJS Custom Playlist
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@jeremejazz
jeremejazz / SimpleStore.js
Last active August 29, 2015 14:27 — forked from ksafranski/SimpleStore.js
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@jeremejazz
jeremejazz / require_all.php
Last active January 9, 2024 22:19
PHP require all files in folder
<?php
$files = glob( __DIR__ . '/folder/*.php');
foreach ($files as $file) {
require($file);
}