Skip to content

Instantly share code, notes, and snippets.

@danielme85
danielme85 / Media.php
Created Aug 3, 2017
A Laravel Model that stores images and sends to TinyPNG API for optimization
View Media.php
<?php
namespace App\Models;
/**
* Created by PhpStorm.
* User: dmellum
* Date: 7/25/17
* Time: 6:04 PM
*/
@danielme85
danielme85 / danTyper.js
Last active Jun 15, 2018
Typewriter effect, made for js/jQuery practice... Try it out at https://codepen.io/anon/pen/rKGwGK
View danTyper.js
/**
* Created by mellu on 3/3/2017.
*/
(function($) {
$.fn.danTyper = function(strings, options) {
var $this = $(this);
var opts = $.extend({}, $.fn.danTyper.defaults, options);
var speed = opts.speed;
var enableCursor = opts.cursor;
var lines = strings.length;
@danielme85
danielme85 / danWeather.js
Last active Mar 2, 2017
Pulls weather data trough ajax and renders bootstrap html. PHP Laravel back-end code: https://gist.github.com/danielme85/8ddd04431ea2d6982e0b14802464ea0a
View danWeather.js
/**
* Created by mellum on 8/3/2016.
* Gets data from Laravel back-end: https://gist.github.com/danielme85/8ddd04431ea2d6982e0b14802464ea0a
* Based on GeoIP2 https://github.com/danielme85/laravel-geoip2
* This product includes GeoLite2 data created by MaxMind, available from: http://www.maxmind.com
* Beautiful css weather icons by Erik Flowers: https://erikflowers.github.io/weather-icons/
* Weather data from: http://openweathermap.org/api
*
*/
(function($) {
@danielme85
danielme85 / Weather.php
Last active May 28, 2018
Pulls weather data from openweathermap using Laravel 5.* framework, based on cords from GeoIP2: https://github.com/danielme85/laravel-geoip2
View Weather.php
<?php
namespace App\Addons;
use GuzzleHttp;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Log;
class Weather
{
@danielme85
danielme85 / danScramble.js
Created Mar 2, 2017
Simple scramble char effect jQuery plugin
View danScramble.js
(function($) {
$.fn.danScramble = function(options) {
var $this = $(this);
var opts = $.extend({}, $.fn.danScramble.defaults, options);
var letters = opts.letters.split('');
var maxTries = opts.maxTotalTries;
var randomMax = opts.randomMax;
var length = letters.length;
var string = $this.text();
var array = string.split('');
You can’t perform that action at this time.