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
#!/bin/bash | |
# This assumes a freshly flashed CHIP. See https://github.com/caseyWebb/Flash-CHIP if you haven't done that. | |
# setup networking | |
sudo nmtui | |
# disable wifi powersaving | |
sudo wget -O/etc/network/if-up.d/wlan_pwr http://fordsfords.github.io/wlan_pwr/wlan_pwr | |
sudo chmod +x /etc/network/if-up.d/wlan_pwr |
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
#!/bin/bash | |
# Run this on the VM host | |
DOWNLOAD_URL=<download url> # Go to https://developer.microsoft.com/en-us/windows/downloads/virtual-machines to get the latest download url | |
VMNAME=UniversitySite | |
CPUS=6 | |
RAM=10240 | |
# Download VM from Microsoft |
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
.sqip-container { | |
position: relative; | |
} | |
.sqip-container .fq { | |
position: absolute; | |
top: 0; | |
z-index: 0; | |
} | |
.sqip { | |
position: relative; |
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
module.exports = class GhostStoragePreprocessorSqipTransform implements IGhostStoragePreprocessorTransform { | |
public async save(image: Image, targetDir?: string) { | |
const res = sqip({ filename: image.path }) | |
const sqipPath = image.path + '.sqip.svg' | |
const sqipImage = Object.assign({}, image, { | |
name: image.name + '.sqip.svg', | |
path: sqipPath, | |
mimetype: 'image/svg', | |
type: 'image/svg' | |
}) |
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
interface IGhostStoragePreprocessorTransform<T = {}> { | |
new?(config: T): void | |
save(img: Image, targetDir?: string): Promise<[Image, string | undefined][]> | |
delete(img: Image, targetDir?: string): Promise<[Image, string | undefined][]> | |
} |
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
<hello-world> | |
<span data-bind="if: ready"> | |
<span data-bind="component: { name: '__HOT__hello-world', params: params }"> | |
Hello, World! | |
</span> | |
</span> | |
</hello-world> |
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
import * as ko from 'knockout' | |
import * as helloWorldComponent from './hello' | |
+ const hotHelloLoader = { | |
+ hotComponentName: '__HOT__hello-world', | |
+ ready: ko.observable(true), | |
+ loadComponent(name, componentConfig, cb) { | |
+ if (name !== 'hello-world') return cb(null) | |
+ ko.components.register(hotHelloLoader.hotComponentName, componentConfig) | |
+ if (!componentConfig.viewModel) { |
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 strict' | |
+ const { HotModuleReplacementPlugin, NamedModulesPlugin } = require('webpack') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
module.exports = { | |
context: __dirname, | |
entry: './index.js', | |
output: './bundle.js', | |
+ devServer: { |
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
export const template = 'Hello, World!' |
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
import { log } from './logger.js' | |
log() | |
module.hot.accept('./logger.js', () => log()) |
NewerOlder