Skip to content

Instantly share code, notes, and snippets.

View rasata's full-sized avatar
😉

Zo-Hasina Rasatavohary rasata

😉
  • Zonova
  • France
View GitHub Profile
declaration:youtube:get_metadata{description:Retrieves metadata of YouTube videos.,parameters:{properties:{urls:{description:Urls of videos for which metadata should be retrieved for.,items:{type:STRING},nullable:true,type:ARRAY}},propertyOrdering:[urls],type:OBJECT},response:{anyOf:[{description:Metadata of a video.,properties:{channel_id:{nullable:true,type:STRING},channel_name:{nullable:true,type:STRING},like_count:{format:int64,nullable:true,type:INTEGER},publish_date:{description:Date of when the video was published in YYYY-MM-DD format.,nullable:true,type:STRING},title:{nullable:true,type:STRING},url:{nullable:true,type:STRING},video_length:{description:The length of the video in ISO 8601 format.,nullable:true,type:STRING},view_count:{format:int64,nullable:true,type:INTEGER}},propertyOrdering:[channel_id,channel_name,like_count,publish_date,title,url,video_length,view_count],title:#/components/schemas/VideoMetadata,type:OBJECT}],type:ARRAY}}
declaration:youtube:play{description:Play video or playlist o
@rasata
rasata / SRT-512-UID-Decoder.py
Created June 20, 2023 13:51
Iso-14443-SRT-512, UID decode based on the specification
# Based on the Specification of the SRT512
# https://www.st.com/resource/en/datasheet/srt512.pdf
def retrieve_serial_number(uid):
# Extracting the 42-bit unique serial number
serial_number = uid & 0x3FFFFFFFFFF
return serial_number
# Prompting the user to enter the UID
que signifie le code shelle suivant :
:(){ :|:& };:
Ce code shell crée une boucle infinie qui fait appel à la fonction elle-même. Il provoque une surcharge système et peut être utilisé pour attaquer un système informatique.
Donne moi le détail des explications de chaque tronçon du code
":()" - Cette ligne définit une fonction appelée ":"
":|:&" - Cette ligne contient une expression pipe qui appelle la fonction elle-même avec le paramètre &, ce qui signifie qu'elle s'exécutera en arrière-plan.
// @ts-ignore
import cookieParser from 'cookie-parser';
// @ts-ignore
import {Request, RequestHandler, Response} from 'express';
import express = require('express');
import {NextFunction} from 'express-serve-static-core';
// @ts-ignore
import path from 'path';
// @ts-ignore
import cors = require('cors');
@rasata
rasata / curl_post_json.md
Created December 6, 2022 15:03 — forked from ungoldman/curl_post_json.md
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@rasata
rasata / linkedin scrapping network.js
Last active December 1, 2022 17:53
Analyze.linkedin.network : This little scrapping is for analyzing linkedin Network from the chrome console.
// Get the Contact List
let contact = $x('//*[@class="reusable-search__result-container "]');
// Function to save the file
// Function to save the file
(function (console) {
console.save = function (data, filename) {
if (!data) {
console.error('Console.save: No data')
return;
@rasata
rasata / npm-install-all.sh
Created November 7, 2022 07:11 — forked from julienroubieu/npm-install-all.sh
Run npm install in all subdirectories
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && npm install" \;
@rasata
rasata / approle.sh
Created June 13, 2022 19:33 — forked from greenbrian/approle.sh
Vault CLI testing AppRole
#!/bin/bash
# start vault
VAULT_UI=true vault server -dev -dev-root-token-id=root -dev-listen-address=127.0.0.1:8200
# login as root - DO NOT DO THIS IN PRODUCTION
vault login root
# write some secrets
vault kv put secret/test color=blue number=eleventeen
@rasata
rasata / pg.sh
Created June 13, 2022 13:34 — forked from jbloetz/pg.sh
strong password generator script
#!/bin/bash
export LC_ALL=C
cat /dev/urandom | tr -cd [:graph:] | head -c ${1:-16}
echo
@rasata
rasata / tig.sh
Created May 24, 2022 07:57 — forked from phillhocking/tig.sh
Instantiate TIG stack on Ubuntu 20.04
sudo apt update ; sudo apt install -y build-essential net-tools curl git software-properties-common
wget https://dl.influxdata.com/telegraf/releases/telegraf_1.19.1-1_amd64.deb
sudo dpkg -i telegraf_1.19.1-1_amd64.deb
sudo systemctl enable --now telegraf
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.6_amd64.deb
sudo dpkg -i influxdb_1.8.6_amd64.deb
sudo systemctl enable --now influxdb
influx -execute 'create database telegraf'
influx -execute "create user telegraf with password 'ExAmPl3PA55W0rD'"
influx -execute 'grant all on telegraf to telegraf'