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
<?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.
@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;
}
@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';
// 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 / 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.

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 / 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);
@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 / Preferences.sublime-settings
Created September 22, 2016 04:45
sublime settings
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"ignored_packages":
[
"Vintage"
],
"theme": "Material-Theme-Darker.sublime-theme",
"translate_tabs_to_spaces": true,
// 5 great visual tweaks
@reliq
reliq / batterymonitor@pdcurtis stylesheet.css
Created September 12, 2016 00:24
Better look for batterymonitor@pdcurtis (BAMS) (Linux Mint)
/*
These settings govern the width of the Applet and the space taken by the font.
Changes may be required with some themes to avoid the display width being exceeded
which leads to jitter with high network speeds and resolutions
or to allow a reduced size width to save panel space.
*/
.bam-normal {
background-color: rgba(0,255,0,0);
border-radius: 0;