It was done on the following environment:
- Raspberry Pi 3 Model B
- OS: Ubuntu Core
- Pi is connected to internet via Ethernet
Here are the overview of the steps:
set -g pane-active-border-bg default | |
set -g pane-active-border-fg "colour14" | |
set -g pane-border-fg "colour239" | |
set -g message-fg black | |
set -g message-bg "colour14" | |
set -g status-justify left | |
set -g status-bg "colour236" | |
set -g status-fg "colour14" |
import * as React from 'react'; | |
import { Component } from 'react'; | |
export default function HOCBaseRender<Props, State, ComponentState>( | |
Comp: new() => Component<Props & State, ComponentState>) { | |
return class HOCBase extends Component<Props, State> { | |
render() { | |
return <Comp {...this.props} {...this.state}/>; | |
} | |
} |
#!/bin/bash | |
# Compresses all .jpg/.jpeg and saves them to opt/ | |
# works with spaces in filenames | |
# make sure you adjust the path to mozjpeg bin | |
# uses the mozilla mozjpeg encoder from https://github.com/mozilla/mozjpeg | |
# based on https://gist.github.com/sauramirez/e0ef5059ab637ed3e2cea090b504f385 | |
# Che4ter - 2017 | |
#Change to mozjpeg path | |
MOZJPEG='/opt/mozjpeg/bin/' |
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
const MainProcessNotification = require("electron").Notification; | |
const isRenderer = process && process.type === "renderer"; | |
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported(); | |
const renderNotify = (title, body) => { | |
const notification = new Notification(title, { | |
body: body | |
}); | |
return notification | |
}; | |
try { |
This very simple and minimal tutorial documents in a few easy steps how to play with WebAssembly (WASM) and get first results within minutes.
While the code below is mostly useless, it will show, how to call the alert
function from within a WASM file and thus demonstrate how to import and export DOM objects.
Of course, this exercise has no real use. It is just meant to show, that getting started with WASM isn't hard. And there is no need for a complex build-chain, tons of tools or a dedicated VMs. Just use a browser, one online tool and that's it.
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1
if you want more or fewer frames.
It's quite common to open up a pull request on GitHub and be confronted with the message This branch has conflicts that must be resolved
. This situation arises when you create a feature branch on an older commit from the master branch. Maybe you forgot to run git pull master
before git checkout -b geocoding_vignette
or maybe a collaborator changed some of the same files on GitHub while you've been working on new things. There are many ways to fix this. One is using the Web Editor build into GitHub and fixing conflicts by hand. This works great if there are not too many conflicts.
Another technique is to rebase your pull request onto the master branch (Move your additional commits on top of the most recent master commit). This is conceptually clean, but sometimes confusing in practice to do cleanly. This example walks through the process where you want to do a rebase, and resolve conflicts by overwriting whatever is on the master branch with change