You can clone the wiki of your github project via ssh:
git clone git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
From https://synocommunity.com add http://packages.synocommunity.com to your NAS package sources. | |
For that, go to NAS->Package Cnter->Click Settings->Package Sources tab. | |
Then from the community, you can see Mosquitto. Install it. | |
After installing, please stop the Mosquitto service before updating configuration. You can start service after changes. | |
Enable Admin login for Synology | |
Enable SSH in NAS | |
Download putty and connect to NAS Server | |
Login using admin | |
Change to root user [sudo -i, {use admin password}] | |
Find mosquitto.conf file [find / -name mosquitto.conf] |
// <https://dev.to/jorik/country-code-to-flag-emoji-a21> | |
function getFlagEmoji(countryCode) { | |
const codePoints = countryCode | |
.toUpperCase() | |
.split('') | |
.map(char => 127397 + char.charCodeAt()); | |
return String.fromCodePoint(...codePoints); | |
} |
const array = [1, 2, 3, 4, 5]; | |
array.groupBy((num, index, array) => { | |
return num % 2 === 0 ? 'even': 'odd'; | |
}); | |
// => { odd: [1, 3, 5], even: [2, 4] }> | |
const odd = { odd: true }; | |
const even = { even: true }; |
You can clone the wiki of your github project via ssh:
git clone git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
export function qsParam(name) { | |
return new URLSearchParams(document.location.search).get(name); | |
} |
Enables any web page to become a rich object in a social graph.
Specs: https://ogp.me/.
Specs for sharing links: https://developers.facebook.com/docs/sharing/opengraph
// NodeJS based directory browsing and file serve without dependencies | |
// Joining code from <https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http> | |
var fs = require("fs"), | |
http = require("http"); | |
http | |
.createServer(function (req, res) { | |
// Website you wish to allow to connect | |
res.setHeader("Access-Control-Allow-Origin", "*"); |
#!/usr/local/bin/fontforge | |
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc | |
fonts = FontsInFile($1) | |
n = SizeOf(fonts) | |
i = 0 | |
while (i < n) | |
Open($1 + "(" + fonts[i] + ")", 1) | |
index = ToString(i + 1) |
let observer = new IntersectionObserver( | |
(entries) => { | |
entries.forEach((entry, i) => { | |
if (entry.isIntersecting) { | |
const p = 2; | |
const c = document.createElement('canvas'); | |
const x = c.getContext('2d'); | |
c.width = 18; | |
c.height = 14; | |
const s = entry.target.innerText; |
// Copied for easier bookmarking from <https://github.com/vercel/next.js/issues/706#issuecomment-569041997> by @Lwdthe1 | |
// next.config.js | |
const aliasPathsToResolve = [ | |
{ name: 'components', path: path.resolve(__dirname, './components') }, | |
{ name: 'Common', path: path.resolve(__dirname, '../../common/react/') }, | |
] | |
module.exports = () => { | |
return { | |
webpack(config, { defaultLoaders }) { | |
config.module.rules.push({ |