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
// You can use https://smartpy.io/ts-ide to originate or tests. | |
/** | |
* Tzblg Object (Child Contract). | |
* Used as microblog platform to store and moderate any TBytes data. | |
* Demo: https://tzblg.xyz/c/KT1X7PGL7gRwj4F3zx4S6DXKDEeTAJ6D47FM | |
*/ | |
export type PermissionsType = { | |
can_anyone_be_author: TBool; |
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 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 |
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 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 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 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 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 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 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 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 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; |
NewerOlder