Skip to content

Instantly share code, notes, and snippets.

@fortybelowzero
fortybelowzero / laravel-mix-webpack-4-minified-gzip.md
Created July 3, 2019 12:54
Laravel Mix (Webpack 4) Minify() -> gZip

How to gzip minified css/js when using Laravel Mix (webpack 4)

These are a couple of quick notes on how we're gzipping minified css/js files in Laravel Mix (based on Webpack 4) given I couldn't find any real discussion/solution to it online. It's a bit of a hack - let me know if there's a better way! (It's also based on our setup, so you'll need to modify to meet your own needs).

(This is a work in progress - I may find a better solution in which case i'll update this gist).

The problem

<html>
<head>
<title>API Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken = "<your agent's client access token>";
var baseUrl = "https://api.api.ai/v1/";
@TahaSh
TahaSh / ajax-validation-with-vue.js
Created January 16, 2016 14:36
Ajax validation with VueJS
new Vue({
el: '#app',
data: {
formInputs: {},
formErrors: {}
},
methods: {
submitForm: function(e) {
@amsgames
amsgames / laravel-5-audio-validator.php
Last active September 16, 2019 05:36
Laravel 5 Audio File Validation, Custom audio validation rules.
<?php
namespace App\Services;
/**
* Custom validator rules.
* Add this at app\Services
*
* @author Alejandro Mostajo <amostajo@gmail.com>
*/
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active November 8, 2023 21:03
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@Golpha
Golpha / IP-Guide.md
Created August 23, 2014 02:25
The PHP IP Guide

The PHP IP Guide

This guide shows you common practices to convert IPv4- and IPv6-Addresses into their binary representation.

Who is responsible for this ?

This guide has been written by Matthias Kaschubowski, a autodidactical software developer from germany with about 14 years of practice converting coffee to code. He works in his free time as a php evangelist on a lot of platforms ( last shown as tr0y on php.de, a german PHP related forum and as himself as an adminstrator at the largest PHP-related facebook group ).

Basics

@learncodeacademy
learncodeacademy / gist:5f84705f2229f14d758d
Last active February 24, 2021 14:48
Getting Started with Vagrant, SSH & Linux Server Administration
@ChrisLTD
ChrisLTD / google-maps-example.html
Created July 14, 2013 00:27
Google Maps API V3 map w/ multiple markers, info boxes and auto center
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.1.min.js"></script>
</head>
<body>
<div id="map" style="width: 500px; height: 400px;"></div>
@stinoga
stinoga / index.html
Last active December 16, 2015 10:48
Responsive Google Maps
<section class="map cf">
<header>
<h3>Super Responsive Map</h3>
</header>
<div class="map" id="map"></div>
<ul class="mapinfo"></ul>
</section>
@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users