Skip to content

Instantly share code, notes, and snippets.

View ntedgi's full-sized avatar
:bowtie:
sudo init 6

Naor Tedgi (Abu Emma) ntedgi

:bowtie:
sudo init 6
View GitHub Profile
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
{
"name": "sss-js",
"version": "1.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"2-thenable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/2-thenable/-/2-thenable-1.0.0.tgz",
"integrity": "sha512-HqiDzaLDFCXkcCO/SwoyhRwqYtINFHF7t9BDRq4x90TOKNAJpiqUt9X5lQ08bwxYzc067HUywDjGySpebHcUpw==",
@ntedgi
ntedgi / checkDockerDisks.sh
Created March 2, 2022 17:01 — forked from robsonke/checkDockerDisks.sh
This Bash script will loop through all running docker containers on a host and list the disk usage per mount. In case it's breaching the 65%, it will email you.
#!/bin/bash
# get all running docker container names
containers=$(sudo docker ps | awk '{if(NR>1) print $NF}')
host=$(hostname)
# loop through all containers
for container in $containers
do
echo "Container: $container"
@ntedgi
ntedgi / download-csv
Created February 14, 2022 13:16 — forked from kiddpt/download-csv
Fast and easy CSV download by streaming for node-express
var csv = require('fast-csv');
var mysql = require('mysql');
var connection = mysql.createConnection(config.mysql);
var pool = mysql.createPool({
connectionLimit: 10,
host: config.mysql.host,
user: config.mysql.user,
password: config.mysql.password,
@ntedgi
ntedgi / index.js
Created January 30, 2022 06:53
aurora failover
const mysql = require('mysql');
class MysqlAdapter {
constructor() {
this.connectionType = 'MASTER';
this.waitingForAutoFaileOverSwitch = false;
this.poolCluster = mysql.createPoolCluster();
this.poolCluster.add(this.connectionType, {
host: 'localhost',
#
# on mac, replace TABGOESHERE with a tab by typing Ctrl-V then the Tab key
#
mysql -u USERNAME --database=dbname --host=HOST --batch -e "select * from tablename" |
sed 's/TABGOESHERE/","/g'| sed 's/^/"/g' | sed 's/$/"/g' | sed 's/\n//g' > destination.csv
'use strict';
/*
open network tools
copy _msearch response
save it to file
*/
const createCsvWriter = require('csv-writer').createObjectCsvWriter;
const fs = require('fs');
//+-------------------------------------------------------------------+
//| DWX_ZeroMQ_Service_v1.0.0.mq5 |
//| Based on DWX_ZeroMQ_Server_v2.0.1_RC8.mq4 |
//+-------------------------------------------------------------------+
#property service
#property copyright "Copyright 2017-2019, Darwinex Labs."
#property link "https://www.darwinex.com/"
#property version "1.0.0"
// Required: MQL-ZMQ from https://github.com/dingmaotu/mql-zmq
@ntedgi
ntedgi / frequency_top_100.csv
Last active August 25, 2020 07:45
Medium Blog
frequency hashtag
58197 COVID19
7741 Covid19
6659 covid19
5216 coronavirus
1794 Coronavirus
980 pandemic
724 India
618 corona
602 lockdown
https://reactjsexample.com/a-react-library-for-generating-a-tree-graph-from-data-using-d3/