- Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
- Make MailHog as a service
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\Concerns\CallsCommands; | |
use Illuminate\Support\Facades\Http; | |
use Laravel\Forge\Forge; | |
use Laravel\Forge\Resources\Daemon; |
# Mailhog | |
MAIL_MAILER=smtp | |
MAIL_HOST=0.0.0.0 | |
MAIL_PORT=1025 | |
MAIL_USERNAME=null | |
MAIL_PASSWORD=null | |
MAIL_ENCRYPTION=null |
// original gist | |
const shuffleArray = arr => arr.sort(() => Math.random() - 0.5); | |
// fully random by @BetonMAN | |
const shuffleArray = arr => arr | |
.map(a => [Math.random(), a]) | |
.sort((a, b) => a[0] - b[0]) | |
.map(a => a[1]); | |
shuffleArray([1, 2, 3]) //[3, 1, 2] |
import {Injectable} from "@angular/core"; | |
import {Platform} from "ionic-angular"; | |
const DB_NAME: string = '__mydbname'; | |
const win: any = window; | |
@Injectable() | |
export class Sql { | |
private _dbPromise: Promise<any>; |
$ uname -r
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
IE9, IE10, and IE11 don't properly scale SVG files added with img
tags when viewBox
, width
and height
attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width
and height
attributes.
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
// --- | |
// Sass (v3.2.9) | |
// --- | |
// Styling elements based on sibling count | |
// http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/ | |
@mixin adjust-form-siblings-count($max: 10, $property: width) { | |
$i: 0; | |
@while ($i < $max) { |