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 / 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 / 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 / 20-nvidia.conf
Last active September 11, 2016 04:00 — forked from yantonov/20-nvidia.conf
Fix brightness on ubuntu 14.04 lts for nvidia cards (create this file at /usr/share/X11/xorg.conf.d/20-nvidia.conf)
Section "Device"
Identifier "Default Device"
Driver "nvidia"
Option "NoLogo" "True"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
@reliq
reliq / 20-intel.conf
Last active September 11, 2016 03:51 — forked from radupotop/20-intel.conf
/etc/X11/xorg.conf.d/20-intel.conf
# /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "card0"
Driver "intel"
Option "Backlight" "intel_backlight"
BusID "PCI:0:2:0"
Option "AccelMethod" "uxa"
Option "TearFree" "true"
EndSection
function random_text( $type = 'alnum', $length = 8 )
{
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'hexdec':