""" | |
This fabric file makes setting up and deploying a django application much | |
easier to webfaction servers or your dedicated server, but it does make a | |
few assumptions. Namely that you're using Git, Apache and mod_wsgi. Also | |
you should have SSH installed on both the local machine and any servers you | |
want to deploy to. | |
Thanks to: | |
http://github.com/ryanmark/django-project-templates |
/*! Dependent Anchor Include Pattern */ | |
/* | |
* Copyright 2011, Scott Jehl (scottjehl.com), Emil Bjorklund (thatemil.com), | |
* and Aaron Gustafson (aaron-gustafson.com) | |
* | |
* Dual licensed under the MIT | |
* Idea from Scott Gonzalez | |
* | |
* to use, place attributes on an already-functional anchor pointing to content | |
* that should either replace, or insert before or after that anchor |
<?php | |
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
if (!isset($_POST['source']) || !isset($_POST['target'])) { | |
header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request'); | |
exit; | |
} |
A pure SASS-script to calculate what alpha channel that is needed for a color to achieve a certain target color when rendered on top of a specified bottom color.
This can be useful when extracting colors from a flat image where you can estimate two colors that are rendered on top of another, but need help with figuring out the alpha number of the top color to achieve the target color in the image.
Imagine eg. a sligthly transparent black box on top of an image. By color picking to adjacent pixels on the corner of the box – the one outside the box as the bottom color and the one in the box as the target color – and then specifying the top color as black and putting all of thos colors into this function – then you'll get back the approximate alpha color needed to achieve the wanted result.
Update 1: Addaded a function for also calculating what color to use to achieve a specific target color when the alpha channel is known (perhaps you have calculated the alpha for an adjacent element and want to figure out w
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
<?php | |
/** | |
* Todo: Decouple from Laravel's Caching system | |
**/ | |
use GuzzleHttp\Collection; | |
use GuzzleHttp\Event\BeforeEvent; | |
use GuzzleHttp\Event\CompleteEvent; | |
use GuzzleHttp\Event\EmitterInterface; |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {