This file contains hidden or 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
private void ContentServicePublished(IPublishingStrategy sender, PublishEventArgs<IContent> e) | |
{ | |
// Slack integration based on: http://blog.darren-ferguson.com/2015/02/03/post-to-slack-when-umbraco-content-is-published/ | |
var slackUrl = SiteSettings.Settings.SlackHookPublishUrl; | |
var slackLinksPrefix = SiteSettings.Settings.SlackHookLinksPrefix; | |
if (slackUrl != null && slackLinksPrefix != null) | |
{ | |
foreach (var entity in e.PublishedEntities) |
This file contains hidden or 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
zip -r -X Archive.zip * |
This file contains hidden or 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 simple web app to display session times from the ACMI website JSON feed. | |
* This source file gets bundled together with its dependencies into bundle.js. | |
* | |
* Dependencies: | |
* | |
* query-string (https://www.npmjs.com/package/query-string) | |
* jquery (https://jquery.com/) | |
* moment (https://momentjs.com/) | |
* |
This file contains hidden or 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
import React from 'react'; | |
import videojs from 'video.js'; | |
import 'video.js/dist/video-js.css'; | |
// video.js player from the docs: https://github.com/videojs/video.js/blob/master/docs/guides/react.md | |
class VideoPlayer extends React.Component { | |
componentDidMount() { | |
// instantiate Video.js | |
this.player = videojs(this.videoNode, this.props, function onPlayerReady() { |
This file contains hidden or 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
# via docker rmi | |
docker rmi $(docker images -f “dangling=true” -q) | |
# or more elegantly | |
docker system prune | |
# remove all unused images, not just dangling ones | |
docker system prune -a |
This file contains hidden or 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
import contentful | |
import markdown | |
from flask import current_app | |
def get_contentful_posts(character_filter=None): | |
""" | |
Get contentful content for posts and return it as a dictionary | |
:character_filter: a string to filter posts by associated character (can only select one at a time) |
This file contains hidden or 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
// After installing 'puppeteer', run Node from a terminal, | |
// then type '.editor' to start a multi-line editor and type the following: | |
const puppeteer = require('puppeteer'); | |
let page; | |
let browser; | |
(async function() { | |
browser = await puppeteer.launch({ headless: false }); | |
page = await browser.newPage(); |
This file contains hidden or 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
<!-- wp:paragraph --> | |
<p>A paragraph.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:columns {"style":{"spacing":{"margin":{"top":"10px","bottom":"10px"}}},"backgroundColor":"blue"} --> | |
<div class="wp-block-columns has-blue-background-color has-background" style="margin-top:10px;margin-bottom:10px"><!-- wp:column {"style":{"spacing":{"padding":{"top":"10px","right":"10px","bottom":"10px","left":"10px"}}},"backgroundColor":"purple"} --> | |
<div class="wp-block-column has-purple-background-color has-background" style="padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px"><!-- wp:paragraph --> | |
<p>Col A</p> | |
<!-- /wp:paragraph --></div> | |
<!-- /wp:column --> |