Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
from django.forms import BaseInlineFormSet, Media | |
class BaseInlineNestedFormSet(BaseInlineFormSet): | |
""" | |
Classe usada para criar formsets aninhados | |
Example: | |
class NestedFormSet(BaseInlineNestedFormSet): | |
nesteds = { | |
"prefix": FormSet, |
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
let mix = require("laravel-mix"); | |
let tailwindcss = require("tailwindcss"); | |
let glob = require("glob-all"); | |
let PurgecssPlugin = require("purgecss-webpack-plugin"); | |
/** | |
* Custom PurgeCSS Extractor | |
* https://github.com/FullHuman/purgecss | |
* https://github.com/FullHuman/purgecss-webpack-plugin | |
*/ |
/** | |
* @author knee-cola / https://github.com/knee-cola | |
* Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1 | |
*/ | |
// This is a simple progressive image loader for Three.js | |
// It enables the smaller image files to be loaded first, | |
// before the big texture image is fully loaded. | |
// | |
// The images are loaded in the order they are passed |
Permalink: git.io/vps
Provider | Type | RAM | Cores | Storage | Transfer | Network | Price |
---|
// Events (Plucked out of backbone.js source) | |
// --------------- | |
// A module that can be mixed in to *any object* in order to provide it with | |
// a custom event channel. You may bind a callback to an event with `on` or | |
// remove with `off`; `trigger`-ing an event fires all callbacks in | |
// succession. | |
// | |
// var object = {}; | |
// _.extend(object, Backbone.Events); |
import _ from 'underscore'; | |
import '../lib/gsap/TweenMax'; | |
import '../lib/preloadjs-0.6.1.combined'; | |
import EventEmitter from '../util/event-emitter'; | |
class CanvasPlayer { | |
constructor(opts) { | |
this.opts = _.defaults(opts || {}, this.getDefaultOpts()); | |
this.state = this.getInitialState(); |
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work. | |
The error was something like "database files are incompatible with server". | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default | |
brew unlink postgresql | |
brew install postgresql95 | |
brew unlink postgresql95 | |
brew link postgresql |
<?php | |
class CacheBustingLaravelValetDriver extends LaravelValetDriver | |
{ | |
public function isStaticFile($sitePath, $siteName, $uri) | |
{ | |
$result = parent::isStaticFile($sitePath, $siteName, $uri); | |
if ($result !== false) { | |
return $result; |
<?php | |
/** | |
* Add to cart redirect to checkout. | |
* | |
* @param string $url | |
* @return string | |
*/ | |
function my_wc_add_to_cart_redirect_to_checkout( $url ) { | |
return wc_get_checkout_url(); |