Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
| <?php | |
| /** | |
| * Class LocalValetDriver | |
| * | |
| * This class demonstrates how we might go about proxying any missing local images to a remote host. i.e; the production | |
| * site. This has been created with WordPress in mind but could be adjusted to work with any other system. | |
| */ | |
| class LocalValetDriver extends WordPressValetDriver { |
An acquaintance needed a video kiosk that plays looping videos for an exposition booth. Since I have a bunch of Raspberry Pis lying around, I figured that it would be the perfect use case for using one of them.
Let's assume we start from scratch, with a unflashed, brand new SD card and your Raspberry Pi.
Install a version of Raspbian that includes the desktop. You can head over to : https://www.raspberrypi.org/downloads/raspbian/ and follow the instructions.
Once the image is downloaded, you can burn it to your SD card with tools like Etcher (https://www.balena.io/etcher/)
Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.
This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.
UPD: This manual now compatible with [email protected]. For older versions deployment, see revision history.
Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:
| <template> | |
| <div id="homepage"> | |
| <h1>Les dernières Articles</h1> | |
| <div class="article" v-for="article in articles"> | |
| <h2> {{ article.title }} </h2> | |
| <p> {{ article.content }} </p> | |
| </div> | |
| </div> | |
| </template> |
| ## Get XML for current page | |
| #set($article = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page")) | |
| ## Get the title of the page | |
| #set($title = $article.getChild("title")) | |
| #set($link = $article.getChild("path").text) | |
| #set($summary = $article.getChild("summary")) | |
| #set($image = $article.getChild("system-data-structure").getChild("lead-image").getChild("image").getChild("path").text) |
| require "rubygems" | |
| require "bundler" | |
| require_relative "lib/importer" | |
| Bundler.setup | |
| desc "Import from Trello board" | |
| task :import do | |
| Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"] | |
| end |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
| <xsl:template match="system-index-block"> | |
| <xsl:apply-templates select="calling-page/system-page/system-data-structure"/> | |
| </xsl:template> | |
| <xsl:template match="system-data-structure"> | |
| <!-- apply templates for content areas --> | |
| <div class="main"> |
| // HTML: | |
| <div class="display-type"></div> | |
| // CSS: | |
| // set the content of an element depending on the media query |
| require 'twitter' | |
| require "json" | |
| USERNAME = 'YOUR_TWITTER_USER_NAME' | |
| ARCHIVE_PATH = 'archive/data/js/tweets' | |
| client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = 'TWITTER_APP_API_KEY' | |
| config.consumer_secret = 'TWITTER_APP_API_SECRET' | |
| config.access_token = 'TWITTER_APP_ACCESS_TOKEN' |