Skip to content

Instantly share code, notes, and snippets.

View hakanbaysal's full-sized avatar
💻
I'm Coding

Hakan Baysal hakanbaysal

💻
I'm Coding
View GitHub Profile
@hakanbaysal
hakanbaysal / mongo2elasticsearch.py
Last active January 5, 2020 21:11
mongo2elasticsearch
class Main:
def __init__(self):
print("Transfer is started")
self.col = self.mongo_connect()
self.es = self.elastic_connect()
self.get_mongo_data()
@staticmethod
def mongo_connect():
client = pymongo.MongoClient("mongodb://localhost:37017/")
@hakanbaysal
hakanbaysal / hero.py
Created May 7, 2020 14:28
Json Process
import json
from jsonpath_ng import jsonpath, parse
class Hero:
def __init__(self):
print('hero')
self.json = {}
self.new_json = {}
@hakanbaysal
hakanbaysal / read_pcap_data.py
Created February 19, 2021 15:56 — forked from iddoeldor/read_pcap_data.py
iterate over pcap, base64 decode packet data w/ python
import json
from pprint import pprint
from scapy.all import *
packets = rdpcap('sniff.cap')
# Let's iterate through every packet
c = 1
arr = []
for packet in packets:
## RabbitMQ application credentials
## Ref: http://rabbitmq.com/access-control.html
##
rabbitmqUsername: guest
# rabbitmqPassword:
## RabbitMQ Management user used for health checks
managementUsername: management
# managementPassword:
@hakanbaysal
hakanbaysal / install-kibana.sh
Created August 5, 2021 16:04 — forked from EikeDehling/install-kibana.sh
Kibana install script debian (as root)
# Install elasticsearch
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
apt-get update
apt-get install kibana
# Configure elastic
sed -i '/#server.host: 192.168.0.1/c\server.host: 0.0.0.0' /etc/kibana/kibana.yml
@hakanbaysal
hakanbaysal / README.md
Created September 24, 2022 19:39 — forked from WisdomSky/README.md
Signal Server Installation v1.88 Full Guide

# Requirements

  • Java 11
  • Maven
  • Redis
  • PostgreSQL
@hakanbaysal
hakanbaysal / README.md
Created January 22, 2023 21:17 — forked from hassansin/README.md
Remote Debugging with XDebug 2.1

XDebug

A PHP extension that allows you to:

  1. walk through your code by Remote Debugging
  2. find bottlenecks in your application by Profiling
  3. find Code Coverage in a single request
  4. trace your application by logging all function calls
@hakanbaysal
hakanbaysal / hosync
Last active February 3, 2023 21:29
hosync host='YOUR_HOST' username='root' port=YOUR_PORT directory=/sites/EPA-API destination=/sites/EPA-API noignore=true debug=true
#!/bin/bash
echo "sync started..."
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
KEY_LENGTH=${#KEY}
VALUE="${ARGUMENT:$KEY_LENGTH+1}"
@hakanbaysal
hakanbaysal / docker-compose.yml
Created February 28, 2023 04:24
Run SQL Server in a Docker Container
version: "3.9"
services:
mssql:
image: mcr.microsoft.com/azure-sql-edge:latest
volumes:
- ./mssql:/var/opt/mssql
ports:
- 1433:1433
environment: