A4988 Drivers
Vref set to ~90% of stepper rated current
Rs = 0.1ohm
X = 0,58v (0,725A)
Y = 0,58v (0,725A)
Z = 0,58v (0,725A)
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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
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
MASTER_IP= | |
SLAVE_IP= | |
# service postgresql stop | |
su - postgres | |
psql -c "CREATE ROLE replica WITH PASSWORD 'myreplpassword' LOGIN REPLICATION;" | |
#Security for master allow standby access | |
echo "host replication replica $SLAVE_IP/32 md5" >> /etc/postgresql/9.6/main/pg_hba.conf |
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
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
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
DROP TABLE IF EXISTS CTE_AllTables; | |
-- CREATE TEMPORARY TABLE IF NOT EXISTS CTE_AllTables | |
CREATE TEMPORARY TABLE CTE_AllTables AS | |
SELECT | |
ist.table_schema AS OnTableSchema | |
,ist.table_name AS OnTableName | |
,tForeignKeyInformation.FkNullable | |
-- WARNING: TableSchema or Tablename can contain entry-separator (';' used) | |
,CAST(DENSE_RANK() OVER (ORDER BY ist.table_schema, ist.table_name) AS varchar(20)) AS OnTableId |