sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
# restart terminal session
nix --version
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
sudo yum install rpm-build rpmdevtools | |
rpmdev-setuptree | |
cd /root | |
mkdir -p rpmbuild/sources/lama_git-1.0 rpmbuild/SPECS | |
cd rpmbuild/sources/lama_git-1.0 | |
printf " | |
#!/bin/bash | |
git add . | |
git commit -m \"updated code\" |
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
from flask import Flask, request | |
from graphene import ObjectType, String, Schema, List, Field | |
''' | |
Pre-requesities: python3 -m pip install graphene flask | |
USAGE: open Postman and create new QraphQL request then paste this url: http://localhost:5000/graphql and these Queries ... |
import pika
import json
# Connect to RabbitMQ
connection = pika.BlockingConnection(
pika.ConnectionParameters('localhost', 5672)
)
channel = connection.channel()
pip install jaeger-client
from jaeger_client import Tracer, SpanContext, Config
# Replace these with your actual configuration
SERVICE_NAME = "your-application-name"
COLLECTOR_HOST = "localhost"
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
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.17.15 | |
docker pull docker.elastic.co/kibana/kibana:7.17.15 | |
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.15 | |
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.17.15 |
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
sudo raspi-config | |
sudo reboot | |
lsmod | grep spi | |
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y python3-dev python3-pip && sudo pip install spidev mfrc522 && mkdir ~/pi-rfid && cd ~/pi-rfid | |
printf " | |
import RPi.GPIO as GPIO | |
from mfrc522 import SimpleMFRC522 | |
reader = SimpleMFRC522() |
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
# Get public ip address | |
ip=$(curl https://api.ipify.org) | |
# Update noip dns using the public ip address | |
curl --location --request GET 'https://dynupdate.no-ip.com/nic/update?hostname=<my-dns-in-noip>&myip=$ip' \ | |
--header 'Authorization: Basic <email:password>' |
print kernels for each video device
udevadm info --attribute-walk --name=/dev/video5 | grep "KERNELS"
sudo nano /etc/udev/rules.d/99-custom-camera.rules
add the following rules
NewerOlder