Skip to content

Instantly share code, notes, and snippets.

View DarkcoderSe's full-sized avatar
:octocat:
Focusing

Dark Coder DarkcoderSe

:octocat:
Focusing
View GitHub Profile
@DarkcoderSe
DarkcoderSe / dumpfile.txt
Last active June 5, 2020 09:43
Cu-online student login credentials CIITWAH [sp13-sp16]
ddl_Session=FA14
ddl_Program=BSE
txt_RollNo=168
txt_Password=jul95
ddl_Session=FA14
ddl_Program=BEE
txt_RollNo=251
txt_Password=335Shahertar
@DarkcoderSe
DarkcoderSe / Payment.php
Last active January 1, 2021 06:30 — forked from Miri92/Payment.php
KapitalBank Payment API with PHP Laravel framework - Example snippet
<?php
namespace App\Models;
use App\Database\EloquentModel as Model;
class Payment extends Model
{
protected $fillable = ['order_id', 'session_id', 'currency', 'order_status', 'order_description', 'amount', 'payment_url', 'status_code','order_check_status','language_code'];
@DarkcoderSe
DarkcoderSe / elasticsearch-template.sh
Created May 12, 2021 05:50
Creation of ElasticSearch template mapping using curl
curl -X PUT "localhost:9200/_template/templateName?pretty" -H 'Content-Type: application/json' -d'
{
"index_patterns": ["indexA*", "indexB*"],
"settings": {
"number_of_shards": 1
},
"mappings": {
"_source": {
"enabled": false
},
@DarkcoderSe
DarkcoderSe / cdm_uq_hospital.conf
Created May 12, 2021 05:56
Logstash configuration file to index data
input {
file {
path => "/home/darkcoder/Node/etlapp/db/cdm_uq_hospitals2.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
## ESI_PROCEDURE Index Pattern
curl -X PUT 'http://localhost:9200/caf-v1?pretty' -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"id": { "type": "long" },
"facility_id": { "type": "keyword" },
"code": { "type": "keyword" },
"address": { "type": "text" },
"city": { "type": "keyword" },
input {
jdbc {
jdbc_driver_library => "/path-to-jdbc/mysql-connector-java-8.0.26/mysql-connector-java-8.0.26.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://ip:port/db"
jdbc_user => 'user'
jdbc_password => 'password'
jdbc_paging_enabled => true
schedule =>"* * * * *"
statement => "SELECT cdm_uq.id, cdm_uq.facility_id, cdm_uq.code, cdm_uq.description, cdm_uq.price, cdm_uq.code_original, hospitals.facility_name, hospitals.address, hospitals.city, hospitals.state, hospitals.zip_code, hospitals.phone_number, hospitals.hospital_type, hospitals.emergency_services, hospitals.hospital_overall_rating, hospitals.latitude, hospitals.longitude FROM `cdm_uq` JOIN `hospitals` ON cdm_uq.facility_id = hospitals.facility_id WHERE cdm_uq.id > :sql_last_value"
@DarkcoderSe
DarkcoderSe / esi_procedure_index_pattern.sh
Created November 15, 2021 07:01
ESI_PROCEDURE Index pattern.
curl -X PUT 'http://localhost:9200/procedure-index-name?pretty' -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"id": { "type": "long" },
"facility_id": { "type": "keyword" },
"code": { "type": "keyword" },
"address": { "type": "text" },
"city": { "type": "keyword" },
"code_original": { "type": "keyword" },
"emergency_services": { "type": "keyword" },
@DarkcoderSe
DarkcoderSe / esi_hospital_index.sh
Created November 15, 2021 07:09
ESI_HOSPITAL ( hospitals data with coords )
curl -X PUT 'http://localhost:9200/hospitals-index-name?pretty' -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"address" : {
"type" : "text"
},
"city" : {
"type" : "keyword"
},
"emergency_services" : {
@DarkcoderSe
DarkcoderSe / esi_cpt_index.sh
Created November 15, 2021 07:11
ESI_CPT Index pattern ( Master List Data )
curl -X PUT 'http://localhost:9200/cpt-index-name?pretty' -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"id": { "type": "long" },
"cpt_code": { "type": "keyword" },
"description": { "type": "text" }
}
}
}'
@DarkcoderSe
DarkcoderSe / medications_index_pattern.sh
Created February 17, 2022 06:46
Medications ( Product NDC ) List Index Pattern
curl -X PUT 'http://localhost:9200/medications-v1?pretty' -H 'Content-Type: application/json' -d '{
"mappings": {
"properties": {
"product_ndc": { "type": "text" },
"product_type_name": { "type": "text" },
"proprietary_name": { "type": "text" },
"proprietary_name_suffix": { "type": "text" },
"non_proprietary_name": { "type": "text" },
"id": { "type": "keyword" },
"product_id": { "type": "keyword" },