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
Last login: Wed Jan 4 23:53:29 on ttys003 | |
➜ electron-edge-js-quick-start git:(master) ✗ COREHOST_TRACE=1 npm start | |
> electron-edge-js-quick-start@1.0.0 start | |
> electron --core . | |
objc[77098]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffa48d1a3b0) and /Users/diluka/Source/electron-edge-js-quick-start/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x110000228). One of the two will be used. Which one is undefined. | |
Tracing enabled | |
CoreClrEmbedding::Initialize - Started | |
CoreClrEmbedding::Initialize - edge.node path is /Users/diluka/Source/electron-edge-js-quick-start/node_modules/electron-edge-js/build/Release |
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 { applyDecorators } from '@nestjs/common'; | |
import { Field, Int } from '@nestjs/graphql'; | |
import { CursorPagingType } from '@ptc-org/nestjs-query-graphql'; | |
import { LimitOffsetPagerStrategy } from '@ptc-org/nestjs-query-graphql/src/types/connection/cursor/pager/strategies'; | |
import { getOrCreateCursorPagingType } from '@ptc-org/nestjs-query-graphql/src/types/query/paging'; | |
import { CannotUseWith } from '@ptc-org/nestjs-query-graphql/src/types/validators'; | |
import { IsOptional, Min, Validate } from 'class-validator'; | |
const CPT = getOrCreateCursorPagingType(); |
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
// modified based on [node.js AES/ECB/PKCS5Padding 与其他语言的加密解密通用](http://yijiebuyi.com/blog/13e2ae33082ac12ba4946b033be04bb5.html) | |
import crypto, { BinaryLike, Encoding } from 'crypto'; | |
import _ from 'lodash'; | |
export class CryptoUtil { | |
/** | |
* 加解密必须使用同一套 key 和 iv | |
* @param {String} algorithm 算法名称,比如 `aes-128-ecb` | |
* @param {String} key 秘钥 | |
* @param {String} iv initialization vector,默认空字符串 |
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
/* | |
* Created by Diluka on 2020-06-29. | |
* | |
* | |
* ----------- 神 兽 佑 我 ----------- | |
* ┏┓ ┏┓+ + | |
* ┏┛┻━━━━━━┛┻┓ + + | |
* ┃ ┃ | |
* ┣ ━ ┃ ++ + + + | |
* ████━████ ┃+ |
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
sudo rm -rf $(xcode-select -print-path) | |
xcode-select --install |
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 { | |
Authorized, | |
BadRequestError, | |
BodyParam, | |
ForbiddenError, | |
JsonController, | |
NotFoundError, | |
Put, | |
QueryParam | |
} from "routing-controllers"; |
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
/* | |
* Copyright under the Parsec Tech Co., Ltd. Version 1.0; | |
* you may not use this file except in compliance with the permit. | |
* Copyright (c) 2019 ChongQing Parsec Technology Corporation. All Rights Reserved. | |
* Version 1.0 | |
*/ | |
/* | |
* Created by Diluka on 2019-04-22. | |
* |
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 { Controller, INestApplication, Injectable } from '@nestjs/common'; | |
import { RepositoryService } from '../../src/typeorm'; | |
import { Company, ormConfig, User, UserProfile } from '../../integration/typeorm/e2e'; | |
import { Crud, Override, ParsedBody, ParsedParams } from '../../src/decorators'; | |
import { InjectRepository, TypeOrmModule } from '@nestjs/typeorm'; | |
import { CrudController, FilterParamParsed } from '../../src/interfaces'; | |
import { Test } from '@nestjs/testing'; | |
import * as supertest from 'supertest'; | |
import { CrudModule } from '../../src/module'; | |
import { CrudConfigService } from '../../src/module/crud-config.service'; |
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 { Repository } from 'typeorm'; | |
import { BaseRepository, initializeTransactionalContext } from 'typeorm-transactional-cls-hooked'; | |
initializeTransactionalContext(); | |
for (const p of Object.getOwnPropertyNames(BaseRepository.prototype)) { | |
Object.defineProperty(Repository.prototype, p, Object.getOwnPropertyDescriptor(BaseRepository.prototype, p)); | |
} |
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
function colorAdjustProcess(data, i) { | |
let R0 = 145, G0 = 170, B0 = 190; //基准色 | |
let R = R0 / (R0 + G0 + B0), G = G0 / (R0 + G0 + B0), B = B0 / (R0 + G0 + B0); //分配比例 | |
let L = 3; // 亮度增益倍率 | |
// | |
let r = data[i] * 0.3086; | |
let g = data[i + 1] * 0.6094; | |
let b = data[i + 2] * 0.0820; |
NewerOlder