Skip to content

Instantly share code, notes, and snippets.

View ophickedo's full-sized avatar
🎯
Focusing

Nikita M. ophickedo

🎯
Focusing
  • The Earth
View GitHub Profile
@ophickedo
ophickedo / cloudSettings
Last active July 3, 2021 13:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-03T13:43:32.656Z","extensionVersion":"v3.4.3"}
// example of plugin design for Fastify
// main.js
const app = Fastify()
app.register(import('./modules/tradingview'), {})
// tradingview.js
const plugin = async (app, options) => {
// check the work of the endpoint
app.get('/', (req, res) => {
subscribeBars: (symbolInfo, resolution, onRealtimeCallback, subscribeUID, onResetCacheNeededCallback) => {
console.log('[subscribeBars]: Method call with subscribeUID:', subscribeUID)
window.interval = setInterval(function () {
getLastKline(symbolInfo.ticker, resolution).then(kline => onRealtimeCallback(kline))
}, 1000 * 60) // 60s update interval
},
unsubscribeBars: (subscriberUID) => {
console.log('[unsubscribeBars]: Method call with subscriberUID:', subscriberUID)
pragma solidity 0.5.16;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
@ophickedo
ophickedo / IslandStaking.sol
Last active January 27, 2022 16:36
111111111
//SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import '@openzeppelin/contracts/access/Ownable.sol';
contract IslandStaking is Ownable {
uint32 public FeePeriod = 7 days;
uint32 public ClaimFee = 2; // 2%
uint32 public minAmount = 500; // min 500 lp/POG tokens --------------- перейменовать minAmount => MinAmount
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © marcius-studio
// Contact us for custom script development: https://studio.marcius.com
//@version=6
strategy('Marcius Studio® - OKX Signal Bot™', overlay = true, currency = currency.USD, initial_capital = 1000)
// Settings
int fast_period = input.int(5, title = 'Fast Period', group = 'SMA')
int slow_period = input.int(10, title = 'Long Period', group = 'SMA')