View Gravatar Laravel 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getGravatarAttribute() | |
{ | |
$hash = md5(strtolower(trim($this->attributes['email']))); | |
return "https://secure.gravatar.com/avatar/$hash?d=mm"; | |
} |
View Using Gravatar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ Auth::user()->gravatar }} |
View Gravatar Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="{{ Auth::user()->gravatar }}" alt="" width="100px" height="100px" class="img-circle"> |
View stateprovince.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label for="state">State/Province</label><span style="color: red !important; display: inline; float: none;">*</span> | |
<select name="state" id="state" class="form-control"> | |
<option> - Select Province/State - </option> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> |
View install_ffmpeg_ubuntu.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
View cf-invalidate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key | |
* 2. Set your AWS secret_key | |
* 3. Set your CloudFront Distribution ID | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php cf-invalidate.php |
View cf-locations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var locations = [ | |
//United States | |
['<h4>Atlanta, GA</h4>', 33.7677129,-84.420604], | |
['<h4>Ashburn, VA</h4>', 39.0299604,-77.4771231], | |
['<h4>Dallas, TX</h4>', 32.8206645,-96.7313396], | |
['<h4>Hayward, CA</h4>', 37.625644,-122.0413544], | |
['<h4>Jacksonville, FL</h4>', 30.34499,-81.720457], | |
['<h4>Los Angeles, CA</h4>', 34.0204989,-118.4117325], | |
['<h4>Miami, FL</h4>', 25.782324,-80.2310801], | |
['<h4>New York</h4>', 40.7033127,-73.979681], |
View googlemaps_locations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Define your locations: HTML content for the info window, latitude, longitude | |
var locations = [ | |
['<h4>Seattle</h4>', 47.614848,-122.3359058], | |
['<h4>Los Angeles</h4>', 34.0204989,-118.4117325], | |
['<h4>Chicago</h4>', 41.8337329,-87.7321555], | |
['<h4>New York</h4>', 40.7033127,-73.979681], | |
['<h4>Virginia</h4>', 38.0033854,-79.4587861], | |
['<h4>Atlanta</h4>', 33.7677129,-84.420604], | |
['<h4>Dallas</h4>', 32.8206645,-96.7313396], |
View progressive-ace.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
... | |
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
... | |
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
<script> | |
// Hook up ACE editor to all textareas with data-editor attribute | |
$(function () { |
View jquery-validate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Validation Plugin v1.13.1 | |
* | |
* http://jqueryvalidation.org/ | |
* | |
* Copyright (c) 2014 Jörn Zaefferer | |
* Released under the MIT license | |
*/ | |
(function( factory ) { | |
if ( typeof define === "function" && define.amd ) { |
OlderNewer