Skip to content

Instantly share code, notes, and snippets.

View reliq's full-sized avatar
:shipit:
Focusing (quality > quantity)

Reliq reliq

:shipit:
Focusing (quality > quantity)
View GitHub Profile
@reliq
reliq / webpack.config.js
Created October 1, 2016 06:17 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@reliq
reliq / README.md
Created October 2, 2016 20:53 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);

Keybase proof

I hereby claim:

  • I am reliq on github.
  • I am reliq (https://keybase.io/reliq) on keybase.
  • I have a public key whose fingerprint is 3C39 D793 5C7D 15C5 ABC0 96C2 6C20 5F27 F1E9 496C

To claim this, I am signing this object:

@reliq
reliq / nonWWW.php
Last active May 9, 2017 02:37
Tiny Laravel 5 middleware to redirect www requests to non-www counterparts.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
/**
* NonWWW
* Redirects any www requests to non-www counterparts.
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@reliq
reliq / stream_file.php
Created March 25, 2018 23:32 — forked from fideloper/stream_file.php
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
@reliq
reliq / leverage-browser-cache-nginx
Last active May 8, 2018 20:55
Leverage browser cache by adding this location directive inside server directives.
#browser caching of static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|woff|woff2|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1y;
access_log off;
}
<?php
return [
// debug mode?
'debug' => false,
// whther log file should be written
'log' => true,
// How much detail is expected in output, 1 being the lowest, 3 being highest.