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
// Send message and post (photo with title/link and text) | |
// to telegram channel | |
// from TG bot | |
// | |
// It requires 2 ENV variables: | |
// TELEGRAM_BOT_TOKEN | |
// TELEGRAM_CHANNEL_ID | |
// | |
// You can get TELEGRAM_CHANNEL_ID: | |
// curl -s "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getChat?chat_id=@<CHANNEL_USERNAME>" | jq .result.id |
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
import React, { Component } from 'react'; | |
class ComplexComponent extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 0, | |
name: 'React Component', | |
isLoading: true, | |
}; |
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
# | |
# If you are reading this message you definitely know what binary code is about. | |
# Take a chance and win a certificate for free training-course at Luxoft Training to upgrade your skills in the IT subject you are interested in | |
# | |
bin_code = "0100100101100110001000000111100101101111011101010010000001100001011100100110010100100000011100100110010101100001011001000110100101101110011001110010000001110100011010000110100101110011001000000110110101100101011100110111001101100001011001110110010100100000011110010110111101110101001000000110010001100101011001100110100101101110011010010111010001100101011011000111100100100000011010110110111001101111011101110010000001110111011010000110000101110100001000000110001001101001011011100110000101110010011110010010000001100011011011110110010001100101001000000110100101110011001000000110000101100010011011110111010101110100001011100000110100001010010101000110000101101011011001010010000001100001001000000110001101101000011000010110111001100011011001010010000001100001011011100110010000100 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
.container { | |
width: 300px; | |
height: 200px; | |
border: 1px solid #ccc; |
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
ALTER TABLE "topic_properties" ADD COLUMN "orderId" INTEGER NULL; | |
DO $$ | |
DECLARE | |
topic topics%ROWTYPE; | |
topic_property topic_properties%ROWTYPE; | |
query TEXT; | |
counter INT; | |
BEGIN | |
FOR topic IN SELECT * FROM topics |
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
const [shrink, setShrink] = useState(false); | |
return ( | |
<TextField | |
sx={{ | |
'& .MuiInputLabel-root:not(.MuiInputLabel-shrink)': { | |
transform: "translate(41px, 17px)" | |
} | |
}} | |
onFocus={() => setShrink(true)} |
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
.one-line { | |
text-overflow: ellipsis; | |
overflow: hidden; | |
white-space: nowrap; | |
} | |
.two-lines { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; |
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 strict'; | |
import stream from 'node:stream'; | |
import timers from 'node:timers/promises'; | |
const createSlowStream = delay => { | |
const options = { | |
async transform(chunk, encoding, next) { | |
for (const char of chunk.toString()) { | |
this.push(char); |
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
#!/bin/bash | |
# SMTP server details | |
smtp_server="localhost" | |
smtp_port="1025" | |
# Sender and recipient details | |
from_address="alex@localhost" | |
to_address="alex@localhost" |
NewerOlder