To make this work in CSS:
background: url('images.svg#chart');
or img:
<img src="images.svg#chart">
# via http://stackoverflow.com/questions/14903664/determine-unique-from-email-addresses-in-maildir-folder | |
import mailbox | |
import email | |
mbox = mailbox.mbox('DADEOL/AOL Mail sorted/Saved.DADEOL Sent.mbox') | |
uniq_emails = set(email.utils.parseaddr(msg['to'])[1].lower() for msg in mbox) | |
for a in uniq_emails: |
$('#container').highcharts({ | |
chart: { | |
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. | |
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here. | |
backgroundColor: '#FFF', // The background color or gradient for the outer chart area. | |
borderColor: '#4572A7', // The color of the outer chart border. | |
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5. | |
borderWidth: 0, // The pixel width of the outer chart border. | |
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart. | |
defaultSeriesType: 'line', // Alias of type. |
To make this work in CSS:
background: url('images.svg#chart');
or img:
<img src="images.svg#chart">
<?php | |
use Pug; // https://github.com/pug-php/pug | |
use Cockpit; | |
require_once __DIR__.'/vendor/autoload.php'; // Composer | |
require_once __DIR__.'/cockpit/bootstrap.php'; // https://github.com/COCOPi/cockpit | |
chdir(dirname(__FILE__)); // Keep this directory if called directly or from Cockpit | |
//setlocale(LC_TIME, 'et_EE', 'et', 'EE', 'ET', 'Estonia'); | |
//define('DATE_FORMAT', "%e. %B %G"); |
/* eslint-disable no-console */ | |
const webpack = require('webpack'); | |
const WebpackDevServer = require('webpack-dev-server'); | |
const cookieParser = require('cookie-parser'); | |
const config = require('./webpack.config')(); | |
const PORT = require('../../package.json').config.port; | |
function relayRequestHeaders(proxyReq, req) { | |
console.log('💥💥💥 request 💥💥💥'); |
package main | |
import ( | |
"github.com/gin-gonic/gin" | |
"github.com/jinzhu/gorm" | |
_ "github.com/mattn/go-sqlite3" | |
) | |
type Users struct { | |
Id int `gorm:"AUTO_INCREMENT" form:"id" json:"id"` |
// Deserialize query string to object | |
// Example: var queryParams = queryStringParse(window.location.search) | |
function queryStringParse (str) { | |
var ret = Object.create(null) | |
if (typeof str !== 'string') { | |
return ret | |
} | |
str = str.trim().replace(/^(\?|#|&)/, '') |
let input = { first_name: 'Foo', last_name: 'Bar' }; | |
// application/graphql example | |
/* eslint-disable no-unused-vars */ | |
let configGraphQL = { | |
url: '/graphql', | |
method: 'post', | |
headers: { 'Content-Type': 'application/graphql' }, | |
data: `mutation { user(id: 1, input: ${ JSON.stringify(input) }){ full_name } }` | |
}; |
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |