Skip to content

Instantly share code, notes, and snippets.

View jonbernardi's full-sized avatar

Jonathan Bernardi jonbernardi

View GitHub Profile
@jonbernardi
jonbernardi / resume.json
Last active July 29, 2025 21:00
Resume
{
"meta": { "theme": "elegant" },
"basics": {
"name": "Jonathan Bernardi",
"label": "Web Developer",
"email": "jon@jonbernardi.com",
"phone": "(925) 234-6914",
"url": "https://jonbernardi.com",
"summary": "I am a full-stack web developer with 19 years of professional experience. I have been using Laravel as my preferred PHP framework for 12 years since version 4.0.",
"location": {
@jonbernardi
jonbernardi / audio-player.js
Last active November 1, 2018 03:48
Audio player component
/**
* Copyright 2018 Jonathan Bernardi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
@jonbernardi
jonbernardi / build.php
Created April 5, 2017 22:47
plates phar
<?php
$srcRoot = realpath(__DIR__."/vendor");
$buildRoot = realpath(__DIR__);
class MyRecursiveFilterIterator extends RecursiveFilterIterator {
public function accept() {
if(!$this->current()->isFile()){
return true;
}
@jonbernardi
jonbernardi / breadcrumbs.sql
Created April 14, 2016 06:59
Get breadcrumbs for nested set
SELECT
GROUP_CONCAT(
ancestor.name
ORDER BY ancestor.lft ASC
SEPARATOR ' > '
),
child.*
FROM `categories` child
JOIN `categories` ancestor
ON child.lft >= ancestor.lft
@jonbernardi
jonbernardi / contact.php
Created November 19, 2015 03:54
Contact From with AJAX
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Contact Us</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<script src='//www.google.com/recaptcha/api.js' async defer></script>
</head>
@jonbernardi
jonbernardi / SymfonySession.php
Created October 9, 2014 21:41
Symfony HttpFoundation Zend\Authentication\Storage adapter
<?php
namespace Spekkionu\Zend\Authentication\Storage;
use Zend\Authentication\Storage\StorageInterface;
use Symfony\Component\HttpFoundation\Session\Session;
class SymfonySession implements StorageInterface
{
/**
* Default session namespace
@jonbernardi
jonbernardi / composer.json
Created October 9, 2014 20:07
Standalone validation using laravel validation component
{
"name": "spakkionu/validate",
"description": "Validation Test",
"require": {
"illuminate/validation": "~4.2.9"
},
"license": "MIT",
"authors": [
{
"name": "Jonathan Bernardi",
@jonbernardi
jonbernardi / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jonbernardi
jonbernardi / designer.html
Created September 3, 2014 16:01
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@jonbernardi
jonbernardi / autoload.php
Created February 3, 2014 21:05
Build Zend Framework 1.x as phar
<?php
require('Zend'.DIRECTORY_SEPARATOR.'Loader'.DIRECTORY_SEPARATOR.'AutoloaderFactory.php');
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => 'Zend'
)
)