Skip to content

Instantly share code, notes, and snippets.

View wploey's full-sized avatar
🏠
Working from home

Wyvern wploey

🏠
Working from home
View GitHub Profile
const path = require('path');
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
let distConfig = require('./webpack.config');
distConfig.output.path = path.resolve(__dirname, 'public/cdn');
distConfig.output.publicPath = '//url.cn/';
distConfig.output.filename = '[chunkhash].js';
distConfig.resolve.alias = {
'moment': 'moment/min/moment.min.js',
.funkyradio div {
clear: both;
overflow: hidden;
}
.funkyradio label {
width: 100%;
border-radius: 3px;
border: 1px solid #D1D3D4;
margin-top: 5px;
@wploey
wploey / cloud9-php7
Created August 10, 2017 03:00 — forked from lirantal/cloud9-php7
Cloud9 PHP7 support
# Installing/Upgrading to PHP 7 from a current PHP 5.5
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip -y
sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.0 -y
@wploey
wploey / macro.md
Created December 14, 2017 03:51 — forked from brunogaspar/macro.md
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@wploey
wploey / _spacing-helpers.scss
Created January 24, 2018 16:09 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@wploey
wploey / flex_with_autoscroll.html
Created June 20, 2018 10:49 — forked from readingtype/flex_with_autoscroll.html
A CSS flexbox layout with a fixed header, a fixed footer, and an expanding centre section which scrolls if its content height is greater than its own height.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test fixed and scrolling divs in a flexbox layout</title>
<style media="screen">
* {
border: 0;
margin: 0;
padding: 0;
@wploey
wploey / vue
Created August 12, 2018 15:33
imageCropper.vue
<style lang="stylus" scoped>
themeColor = #45b795
.box
display flex
position relative
.box-f1
flex 1
@wploey
wploey / valet.conf
Created August 13, 2019 10:48 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;