Skip to content

Instantly share code, notes, and snippets.

Luke Policinski lukepolo

Block or report user

Report or block lukepolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Loader
import NProgress from "nprogress";
window.NProgress = NProgress;
export default function loadProgressBar(config) {
let timeoutSet = false;
let requestsCounter = 0;
let spinnerTimeout = null;
const setupStartProgress = () => {
axios.interceptors.request.use((config) => {
@lukepolo
lukepolo / valet.conf
Created Mar 23, 2019 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
View valet.conf
# 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;
View Varie Example with Laravel
const path = require("path");
const VarieBundler = require("varie-bundler");
const ENV = require("dotenv").config().parsed;
module.exports = function(env, argv) {
return new VarieBundler(argv, __dirname)
.entry("app", ["resources/js/app/app.ts", "resources/sass/app.scss"])
.aliases({
"@app": path.join(__dirname, "resources/js/app"),
"@views": path.join(__dirname, "resources/js/views"),
"@store": path.join(__dirname, "resources/js/store"),
View Webpack Config
{
mode: 'development',
context: '/Users/luke/Code/opensource/varie/varie',
devtool: 'eval-source-map',
stats: {
hash: false,
chunks: false,
modules: false,
source: false,
reasons: false,
View gist:7b8733799a0ef011ea2a1797bad5cf60
{
"authHost": "https://codepier.io",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "keyhere",
"key": "keyhere"
}
],
"database": "redis",
View keybase.md

Keybase proof

I hereby claim:

  • I am lukepolo on github.
  • I am lukepolo (https://keybase.io/lukepolo) on keybase.
  • I have a public key ASAKAKZfk9QeISdkwZXXfa-M0RQzuOXI3ZlrP_nnRF_DhQo

To claim this, I am signing this object:

@lukepolo
lukepolo / Article.php
Last active Feb 17, 2017
Current Revision Query
View Article.php
<?php
/**
* The problem : i want to retrieve articles with their current revision of the status of Pending.
*
* Go to the controller, see that im using the scope of `hasType`, follow through into the article model
* you will see that we are using a `whereHas` . Whats funny is its working in the fact if `NONE` of the article revisions
* have a status of pending it works! But if `1` has a status of `pending` it will return the latest revision even if its not
* pending
*/
View package.json
{
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --progress --hide-modules",
"watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules",
"hmr": "cross-env NODE_ENV=development webpack-dev-server --inline --hot",
"production": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"devDependencies": {
"cross-env": "^3.1.4",
@lukepolo
lukepolo / Error.js
Last active Feb 28, 2017
Helper Classes for Vue.js / Vuex / Vue-Router
View Error.js
//https://github.com/laracasts/Vue-Forms/blob/master/public/js/app.js
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
View sample.js
<script>
import Form from '../../../libraries/form.js';
export default {
created() {
if ( !Object.keys(this.$store.getters.businesses).length )
this.$store.dispatch('getBusinesses')
},
data() {
return {
You can’t perform that action at this time.