This file contains hidden or 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
| /* Click by div'container' or any element inside in browser and ctrl+v to paste image. */ | |
| /* Pls copy any image in clipboard before :) */ | |
| import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; | |
| @Component({ | |
| selector: 'catalog-page-upload', | |
| template: /*html*/` | |
| <div class="container" (paste)="onPaste($event)"> | |
| <h1>Привет , мир!</h1> |
This file contains hidden or 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
| @HostListener('document:keydown', ['$event']) handleKeyboardEvent(event: KeyboardEvent) { | |
| if ((event.ctrlKey || event.metaKey) && event.keyCode === 86) { | |
| console.log('CTRL + V', event); | |
| } | |
| } | |
| @HostListener('paste', ['$event']) onPaste(e: any) { | |
| const items = e.clipboardData.items; | |
| let blob = null; |
This file contains hidden or 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
| find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
This file contains hidden or 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 */ | |
| console.log('start'); | |
| setTimeout(() => { | |
| console.log('global setTimeout 0'); | |
| }, 0); | |
| let i = 0; | |
| Promise.resolve() |
This file contains hidden or 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
| /** | |
| * Преобразовать `#FF0000` -> `rgba(255, 0, 0, 1)` | |
| * https://stackoverflow.com/a/28056903 | |
| * | |
| * @param {string} hex | |
| * @param {number} alpha | |
| */ | |
| export function hexToRGB(hex, alpha) { | |
| const r = parseInt(hex.slice(1, 3), 16); | |
| const g = parseInt(hex.slice(3, 5), 16); |
This file contains hidden or 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
| const readline = require('readline'); | |
| function colorToHex(rgb) { | |
| let hex = Number(rgb).toString(16); | |
| if (hex.length < 2) { | |
| hex = `0${hex}`; | |
| } | |
| return hex; | |
| }; |
This file contains hidden or 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 { Request, Response, NextFunction } from 'express'; | |
| export type ExpressMethodType = (req: Request, res: Response, next?: NextFunction) => void; | |
| export interface CrudControllerInterface { | |
| addNew?: ExpressMethodType; | |
| get?: ExpressMethodType; | |
| getById?: ExpressMethodType; | |
| update?: ExpressMethodType; | |
| delete?: ExpressMethodType; |
This file contains hidden or 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 React, { PureComponent } from 'react'; | |
| import { View } from 'react-native'; | |
| import { connect } from 'react-redux'; | |
| import i18n from '@app/i18n'; | |
| // or import withTranslation('calibration')(Component); | |
| import { ButtonBottom } from '@app/theme/components/Button'; |
This file contains hidden or 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 Rutger Bresjer on 10/10/2017 | |
| // Notes: | |
| // - Be sure to enable "Hotspot Configuration" capability for the iOS target | |
| // - Make sure the NetworkExtension framework is linked to the target | |
| #import <Foundation/Foundation.h> | |
| #import <React/RCTBridgeModule.h> | |
| @interface IOSWifiManager : NSObject <RCTBridgeModule> |
This file contains hidden or 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 bpy | |
| from random import random as rnd | |
| # Clean scene: | |
| objs = bpy.data.objects | |
| for e in objs: | |
| objs.remove(e, do_unlink=True) | |
| spacing = 34 | |
| offset = 160 |