Skip to content

Instantly share code, notes, and snippets.

@Lazyt3ch
Lazyt3ch / steps.md
Created September 30, 2021 04:06 — forked from mraaroncruz/steps.md
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

New improved next steps

  1. Go to https://web.telegram.org
  2. Click on your channel
  3. Look at the URL and find the part that looks like c12112121212_17878787878787878
  4. Remove the underscore and after c12112121212
@Lazyt3ch
Lazyt3ch / README.md
Created August 24, 2021 06:27 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@Lazyt3ch
Lazyt3ch / React_D3.md
Created August 21, 2021 07:22 — forked from alexcjohnson/LICENSE
Working with React and D3 together

React + D3

The key challenge in integrating D3 code into a React app is how to break up responsibility for DOM manipulation, so the two frameworks don’t step on each others’ toes yet updates are efficient and reliable. There are a lot of ways to go about this and which is best may depend on the specifics of your application. The key is to draw a very clear line between the responsibilities of React and D3 and never let either one cross into the other’s territory. React will always provide the overarching structure, D3 the details of the chart, but the exact boundary can be drawn in several places.

One other note - most of the discussion below (except for example react-faux-dom which is tailored to D3) applies just as well to integrating other packages or JS components inside a React app.

Approaches

Lifecycle methods wrapping regular D3 code:

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@Lazyt3ch
Lazyt3ch / links - writing fast code for react and typescript.md
Created March 20, 2021 12:19 — forked from victor-homyakov/links - writing fast code for react and typescript.md
Ссылки для презентации "Код на React и TypeScript, который работает быстро"