Skip to content

Instantly share code, notes, and snippets.

View tnylea's full-sized avatar
💻
Hacking away...

Tony Lea tnylea

💻
Hacking away...
View GitHub Profile
@tnylea
tnylea / CSS RESET
Created June 28, 2012 22:47
This is a simple CSS Reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@tnylea
tnylea / GitHub Gists CSS
Created June 28, 2012 23:02
CSS to add un-selectable line numbers to your github gists
.gist {
border-left: 3ex solid #eee;
position: relative;
}
.gist pre {
counter-reset: linenumbers;
}
.gist pre div:before {
@tnylea
tnylea / appjs
Created July 1, 2012 20:05
appjs file for simple chat
var app = require('http').createServer(handler)
, io = require('socket.io').listen(app)
, fs = require('fs')
app.listen(5432);
function handler (req, res) {
fs.readFile(__dirname + '/index.html',
function (err, data) {
if (err) {
@tnylea
tnylea / index.html file for chat
Created July 1, 2012 20:07
index file for simple chat
<html>
<head>
<title>Simple Node JS and Socket IO Chat</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:5432');
// add a new chat message
socket.on('add_message', function (name, data) {
@tnylea
tnylea / google-image-api-search
Created June 6, 2014 18:38
Google Images Hello World Example
@tnylea
tnylea / app-imgur.html
Created September 3, 2014 23:39
Polymer Imgur Gallery Element
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/core-ajax/core-ajax.html">
<polymer-element name="app-imgur" noscript>
<template>
<style>
:host {
* {
padding: 0;
margin: 0;
@tnylea
tnylea / template
Last active August 29, 2015 14:06
Base App Element
<link rel="import" href="../bower_components/polymer/polymer.html">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<!--
@element app-name
-->
<polymer-element name="app-name">
<template>
<style>
:host {
@tnylea
tnylea / entypo.css
Created December 16, 2014 21:29
Correct Entypo CSS File
@font-face {
font-family: 'EntypoRegular';
src: url('../fonts/entypo.eot');
src: url('../fonts/entypo.eot?#iefix') format('embedded-opentype'),
url('../fonts/entypo.woff') format('woff'),
url('../fonts/entypo.ttf') format('truetype'),
url('../fonts/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@tnylea
tnylea / app.blade.php
Last active November 5, 2016 18:08
Laravel Master File Head Information
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@if(isset($seo_title)){{ $seo_title . ' - Site Name' }}@else{{ 'Site Name - Default Site Headline' }}@endif</title>
<!-- only set meta description and keywords if exists -->
@tnylea
tnylea / social.php
Created December 6, 2016 18:24
Social Share for Laravel apps
<ul>
<li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=<?= Request::url() ?>" target="_blank" title="Share on Facebook" onclick="javascript:window.open(this.href, '_blank', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><i class="fa fa-facebook"></i></a></li>
<li class="twitter"><a href="https://twitter.com/intent/tweet?url=<?= Request::url() ?>&text=<?= $title ?>" data-url="<?= Request::url() ?>" title="Share on Twitter"><i class="fa fa-twitter" data-url="<?= Request::url() ?>"></i></a></li>
<li class="googleplus"><a href="https://plus.google.com/share?url=<?= Request::url() ?>" target="_blank" title="Share on Google" onclick="javascript:window.open(this.href, '_blank', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;"><i class="fa fa-google-plus"></i></a></li>
<li class="pinterest"><a href="//www.pinterest.com/pin/create/button/?url=<?= Request::url() ?>&media=<?= $image_url ?>&description=<?= $de