Skip to content

Instantly share code, notes, and snippets.

View 7flash's full-sized avatar
🎯
Focusing

Igor Berlenko 7flash

🎯
Focusing
  • Telegram @galaxygur
View GitHub Profile
@7flash
7flash / bot.rb
Created March 23, 2024 09:20 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
// 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(
did:3:kjzl6cwe1jw14a8o3jsdd84lvq2nmji1zy441jtu7kp7j5cvq7ub9idjs0fk35p
did:3:kjzl6cwe1jw1462ydxl38pilbc4k06ajh5ugwxo2dkrrvlg86bxdjd1u76lciag
#
# 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.
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
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);
@7flash
7flash / flatten.js
Created July 8, 2017 15:08 — forked from arvinsim/flatten.js
Code to flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
// 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
@7flash
7flash / es6-scraper
Created May 18, 2017 10:08
Request + cheerio + corotines
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);
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);
}