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
'use strict'; | |
/* | |
open network tools | |
copy _msearch response | |
save it to file | |
*/ | |
const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
const fs = require('fs'); |
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
# | |
# 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 | |
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
const mysql = require('mysql'); | |
class MysqlAdapter { | |
constructor() { | |
this.connectionType = 'MASTER'; | |
this.waitingForAutoFaileOverSwitch = false; | |
this.poolCluster = mysql.createPoolCluster(); | |
this.poolCluster.add(this.connectionType, { | |
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
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, |
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
#!/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" |
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
{ | |
"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==", |
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
############################################################################################################ | |
################## ############################# | |
################## ############################# | |
This Gist collection contains all localstack related examples | |
################## ############################# | |
################## ############################# | |
############################################################################################################ |
OlderNewer