curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install nodejs
sudo apt install npm
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
--- | |
swagger: "2.0" | |
info: | |
description: | | |
This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api). | |
version: "3.6" | |
title: Telegram Bot API | |
host: api.telegram.org | |
schemes: | |
- https |
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 | |
check_storage() { | |
# Get the disk usage percentage | |
usage=$(df -h --output=pcent / | tail -n 1 | tr -d ' %') | |
if [ "$usage" -ge 70 ]; then | |
return 0 | |
else | |
return 1 | |
fi |
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, { useEffect } from 'react'; | |
import { Space, Table, Tag } from 'antd'; | |
import type { ColumnsType } from 'antd/es/table'; | |
import { atom, useAtom } from 'jotai' | |
import { currentTableData } from './atoms'; | |
interface DataType { | |
Id: string; | |
Jid: string; | |
Name: string; |
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 chromium from '@sparticuz/chrome-aws-lambda'; | |
export const GenerateBuffer = async (content) => { | |
try { | |
const puppeteer = chromium.puppeteer; | |
const browser = await puppeteer.launch({ | |
args: chromium.args, | |
executablePath: await chromium.executablePath, | |
}); | |
console.log('We have a browser', browser); |
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
package main | |
import ( | |
"crypto/rsa" | |
"crypto/sha256" | |
"crypto/x509" | |
"encoding/base64" | |
"encoding/pem" | |
"fmt" | |
"io/ioutil" |
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
<?php declare(strict_types=1); | |
require __DIR__ . '/../vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\GuzzleException; | |
use GuzzleHttp\RequestOptions; | |
// ==================== // |
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 cryptoJS = require("crypto-js") | |
function genAuth() { | |
let e = (new Date).toUTCString() | |
, t = cryptoJS.enc.Utf8.parse((!0 ? "PaRr8".split("").reverse().join("") : "") + | |
function (e) { | |
return e ? "s7Xp?".split("").reverse().join("") : "" | |
}(!0) + | |
function (e) { | |
return e ? "%#5hf".split("").reverse().join("") : "" |
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
alias pacup="sudo pacman -Syu" | |
alias yayup="yay -Syu" | |
alias cleanup="yay -Scc" | |
alias server="ssh ubuntu@$IP -i ~/.ssh/mumbaiaws.pem" | |
alias printpath="echo $PWD" | |
# spelling correction | |
alias exi="exit" | |
alias exti="exit" | |
alias eitx="exit" |
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 csv from 'csv-parser' | |
import { createReadStream } from 'fs' | |
import axios from 'axios' | |
// constants | |
const BOT_TOKEN = "BOT TOKEN HERE" | |
const CHANNEL_ID = -763513 // replace it with your group id | |
// function to read data from csv file and return it as an array | |
async function getData() { |
NewerOlder