This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add to <head> to prevent duplicate content issues in search engine optimization --> | |
<link rel="canonical" href="{{ page.full_url }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
display: inline-block; | |
vertical-align: middle; | |
width: 1rem; | |
height: 1rem; | |
stroke: currentcolor; | |
fill: none; | |
stroke-width: 2; | |
stroke-linecap: round; | |
stroke-linejoin: round; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load wagtailcore_tags %} | |
<div id="accordion-{{ forloop.counter }}" role="tablist" aria-multiselectable="false" class="card-collapse"> | |
{% for block in self %} | |
<div class="card card-plain"> | |
<div class="card-header" role="tab" id="heading-{{ forloop.counter }}"> | |
<a data-toggle="collapse" data-parent="#accordion-{{ forloop.parentloop.counter }}" href="#collapse-{{ forloop.parentloop.counter }}-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse-{{ forloop.parentloop.counter }}-{{ forloop.counter }}"> | |
{% include_block block.value.question %} | |
<i class="fa fa-chevron-down"></i> | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forms.py | |
from django import forms | |
from . import widgets | |
class CustomWidgetForm(forms.Form): | |
working = forms.BooleanField( | |
required=False, | |
widget=widgets.ToggleWidget( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://nickymeuleman.netlify.app/blog/css-animated-wrapping-underline | |
// https://codepen.io/jh3y/pen/gOPjBPM | |
:root { | |
--underline-width: 5px; | |
--underline-block-width: 2rem; | |
--underline-color: hsla(7, 72%, 49%, 0.363); | |
--underline-color-hover: transparent; | |
--underline-transition-in: 0.75; | |
--underline-transition-out: 0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Take a parameter from the URL ie. /?myparam=value | |
created() { | |
let uri = window.location.search.substring(1) | |
let params = new URLSearchParams(uri) | |
if (params.get("myparam") !== null) { | |
console.log(`My URL parameter: ` + params.get("myparam")) | |
this.something = params.get("myparam") | |
this.myFunction() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use script https://downloads.linux.hpe.com/SDR/add_repo.sh (wget, chmod +x, run) or add manually: | |
vim /etc/apt/sources.list.d/HP-mcp.list | |
# HPE Management Component Pack | |
# Latest, here for Debian stretch: | |
deb http://downloads.linux.hpe.com/SDR/repo/mcp stretch/current non-free | |
# for Gen9 and older, use 10.xx dist: | |
deb http://downloads.linux.hpe.com/SDR/repo/mcp stretch/10.62 non-free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Apache vHost configuration file | |
# Source: http://grimnes.no/blog/how-easily-deploy-wagtail-website/ | |
<VirtualHost *:80> | |
ServerName www.example.com # your domain name | |
ServerAlias example.com *.example.com | |
Define project_name some_project_name # | |
Define user the_username # who owns the project? /home/the_username/.. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define dependencies | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var nano = require('gulp-cssnano'); | |
var parker = require('gulp-parker'); | |
var run = require('gulp-run'); | |
const workboxBuild = require('workbox-build'); | |
// Compile sass to compressed css andd add vendor prefixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_headers.c> | |
<filesmatch "sw.js"> | |
Header set Cache-Control "max-age=0, private" | |
</filesmatch> | |
</IfModule> | |
Check with: | |
curl -I -L http://www.example.com/sw.js |
NewerOlder