Skip to content

Instantly share code, notes, and snippets.

View nicolaschenet's full-sized avatar

Nicolas Chenet nicolaschenet

View GitHub Profile
@nicolaschenet
nicolaschenet / README.md
Last active August 30, 2021 13:05
Bitpool's Napbots allocations, depending on the crypto weather

Disclaimer

These allocations are mine and don't have any value regarding financial advice. Use them at your own risks :) They have been initially discussed with Stéphane Ifrah, who is no longer actively involved in Napbots.

If you feel lost and wonder what the hell you're doing here, feel free to join us on Telegram: https://t.me/NapBots

No touching!


// Send update via Telegram
const res = await Promise.all(Object.keys(output?.exchanges).map(async exchangeCode => {
const exchange = output?.exchanges?.[exchangeCode]
await require("@pipedreamhq/platform").axios(this, {
method: 'POST',
url: `https://api.telegram.org/bot${auths.telegram_bot_api.token}/sendMessage`,
data: {
chat_id: steps.setup.$return_value.telegramChatID,
text: `Hey! I just updated your allocations on ${exchangeCode}, because the crypto weather just updated to ${exchange.weather} ;)`
}
@nicolaschenet
nicolaschenet / 0__readme.txt
Last active March 13, 2021 17:31 — forked from gahabeen/0__readme.txt
NapBots - Dynamic Allocations v1
For updates, leave a comment below!
/** Given a specific ref, returns the Intersection information */
import * as React from 'react';
import type {
UseIntersectionOptions,
UseIntersectionReturnValue
} from './useIntersectionObserver.types.ts';
export const useIntersection = (
(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,v=e.reduce,h=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.3";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.leng