We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
.flex { | |
display: flex; | |
.align-center { | |
margin: auto; | |
align-self: center; | |
} | |
.align-left { | |
margin-right: auto; |
// Forked from https://codepen.io/gapcode/pen/vEJNZN | |
// Get IE or Edge browser version | |
var version = detectIE(); | |
if (version === false) { | |
document.getElementById('result').innerHTML = '<s>IE/Edge</s>'; | |
} else if (version >= 12) { | |
document.getElementById('result').innerHTML = 'Edge ' + version; | |
} else { |
Vue.filter('limit', function(array, length) { | |
var limitCount = parseInt(length, 10); | |
if (limitCount <= 0) { | |
("development") !== 'production' && _.warn( | |
'The limit filter requires an argument defining the limit count.' | |
); | |
return array; | |
} | |
return array.slice(0, limitCount); | |
}); |
window.onscroll = function() { | |
var d = document.documentElement; | |
var offset = d.scrollTop + window.innerHeight; | |
var height = d.offsetHeight; | |
console.log('offset = ' + offset); | |
console.log('height = ' + height); | |
if (offset >= height) { | |
console.log('At the bottom'); |
from django import forms | |
from inventory.models import Computer | |
class ComputerForm(forms.ModelForm): | |
class Meta: | |
model = Computer | |
class ChromebookForm(forms.ModelForm): |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |