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 { createServer, type IncomingMessage, type ServerResponse } from "http"; | |
import { StringDecoder } from "string_decoder"; | |
import { parse } from "url"; | |
import next from "next"; | |
import nextConfig from "../next.config"; | |
const decoder = new StringDecoder("utf-8"); |
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
-- using example: | |
-- sleep 10 && osascript start.applescript "http://local.${PROJECT_DOMAIN}.com:8080" 8080 & | |
-- yarn start | |
on run argv | |
tell application "Google Chrome" | |
activate | |
set targetURL to (item 1 of argv) | |
-- I know I can parse it but I'm too lazy... | |
set targetPort to (item 2 of argv) |
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
/* eslint-disable no-plusplus */ | |
/* eslint-disable func-names */ | |
/* eslint-disable no-restricted-syntax */ | |
const fs = require('fs'); | |
const path = require('path'); | |
/** load the existing json map with access to write and read */ | |
const variablesMapJSON = path.join(__dirname, '/variables-map.json'); | |
/** |
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
/** [E]UR, [S]EK, [G]PB, [P]LN, [D]KK, NOK, CHF, [U]SD, [CA]D */ | |
const defaultNumberToPriceFn = function numberToPrice(n, c) { | |
let smb = c || this.currency; | |
if (smb[0] === 'E') { smb = '€'; } | |
else if (smb[0] === 'U' || (smb[0] === 'C' && smb[1] === 'A')) { smb = '$'; } | |
else if (smb[0] === 'S' || smb[0] === 'D') { smb = 'kr'; } | |
else if (smb[0] === 'G') { smb = '£'; } | |
else if (smb[0] === 'P') { smb = 'zł'; } | |
const nR = Math.round(+(n || 0) * 100) / 100; | |
const nStr = nR.toString(); |
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
/* eslint-disable */ | |
import path from 'path'; | |
import fs from 'fs'; | |
import webpack from 'webpack'; | |
import HtmlWebpackInlineSVGPlugin from 'html-webpack-inline-svg-plugin'; | |
import SVGSpritemapPlugin from 'svg-spritemap-webpack-plugin'; | |
// import { WebpackBundleSizeAnalyzerPlugin } from 'webpack-bundle-size-analyzer'; | |
import packageData from '../../package.json'; | |
import pathsResolveConfig from './paths.resolve.config'; | |
import appPackageData from '../../../mobile-app/package.json'; |
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
/* eslint-disable */ | |
import path from 'path'; | |
import fs from 'fs'; | |
import webpack from 'webpack'; | |
import HtmlWebpackInlineSVGPlugin from 'html-webpack-inline-svg-plugin'; | |
import SVGSpritemapPlugin from 'svg-spritemap-webpack-plugin'; | |
// import { WebpackBundleSizeAnalyzerPlugin } from 'webpack-bundle-size-analyzer'; | |
import packageData from '../../package.json'; | |
import pathsResolveConfig from './paths.resolve.config'; | |
import appPackageData from '../../../mobile-app/package.json'; |
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
1. npm uninstall spdy | |
2. npm install http2-proxy finalhandler | |
3. replace the code | |
import spdy from 'spdy'; | |
spdy.createServer(HTTP2_OPTIONS, app).listen(HTTP2_PORT, (error) => { ... | |
with |
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
{"lastUpload":"2020-05-12T11:51:27.444Z","extensionVersion":"v3.4.3"} |
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
/* eslint-disable */ | |
var loaderUtils = require('loader-utils'); | |
/** | |
* getLocalIdent function for preact-css-modules | |
* do (null, null, className) for manual use | |
*/ | |
var getLocalIdent = (context, localIdentName, localName, options) => { | |
var result = localName; | |
/** exclude some classNames */ |
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
--c--- get multiplier from things todo object | |
on getMultiplierFromToDo(theToDo, defaultMultiplierValue) | |
local theToDo | |
set toDoName to name of theToDo | |
set multiplier to second character of toDoName | |
set multiplierBefore to first character of toDoName | |
set multiplierAfter to third character of toDoName | |
set isValidMultiplier to ((multiplierBefore is equal to "[") and (multiplierAfter is equal to "]")) | |
set multiplierValue to defaultMultiplierValue | |
if isValidMultiplier then set multiplierValue to multiplier as real |
NewerOlder