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
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.9; | |
// https://github.com/yieldyak/yak-aggregator/blob/master/src/contracts/interface/IAdapter.sol | |
interface IAdapter { | |
function name() external view returns (string memory); | |
function swapGasEstimate() external view returns (uint256); | |
function swap( |
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
did:3:kjzl6cwe1jw14a8o3jsdd84lvq2nmji1zy441jtu7kp7j5cvq7ub9idjs0fk35p |
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
did:3:kjzl6cwe1jw1462ydxl38pilbc4k06ajh5ugwxo2dkrrvlg86bxdjd1u76lciag |
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
# | |
# Panoramix v4 Oct 2019 | |
# Decompiled source of 0x4f4e0f2cb72E718fC0433222768c57e823162152 | |
# | |
# Let's make the world open source | |
# | |
# | |
# I failed with these: | |
# - unknowna270ef06(?) | |
# All the rest is below. |
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
local notifications: | |
https://pub.dev/packages/flutter_local_notifications | |
A library useful for creating fuzzy timestamps. (e.g. "5 minutes ago") | |
https://pub.dev/packages/timeago | |
rating widgets: | |
https://pub.dev/packages/smooth_star_rating | |
https://pub.dev/packages/flutter_rating |
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
pragma solidity ^0.4.24; | |
interface IToken { | |
function name() external view returns(string); | |
function symbol() external view returns(string); | |
function decimals() external view returns(uint8); | |
function totalSupply() external view returns (uint256); |
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
// NodeJS | |
const assert = require('assert'); | |
/** | |
* Flatten an array of arbitrarily nested arrays of integers into a flat array of integers. | |
* e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
* | |
* @name flatten | |
* @param {Array} arr An array to flatten, nested or otherwise | |
* @returns {Array} the flattened array |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var co = require('co'); | |
function parse(url) { | |
// Make promise from calback | |
return new Promise((resolve, reject) => { | |
request({url}, function(error, response, body) { | |
if(error) return reject(error); |
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
var co = require('co'); | |
function getResult(item) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
if(item > 5) { | |
reject('Break! Last page reached.'); | |
} else { | |
resolve(item * 2); | |
} |
NewerOlder