Skip to content

Instantly share code, notes, and snippets.

@DarinDev1000
DarinDev1000 / My_Recommended_Programs.md
Created January 20, 2020 02:14
My Recommended Programs
@DarinDev1000
DarinDev1000 / init-export-db-schema.sh
Last active February 8, 2020 08:48
Run this file in your project directory to add a database schema export script.
#!/bin/bash
echo "************************************"
echo
echo "This script initializes a new database schema export in this project"
echo "It exports the database schema from localhost with the mysql and mysqldump cli tools"
echo
echo "You may want to make a new database user named 'export' with the correct permissions"
echo "permissions example: mysql> GRANT SELECT,LOCK TABLES ON DBNAME.* TO 'username'@'localhost';"
echo
echo "------WARNING------"
@DarinDev1000
DarinDev1000 / Database Schema script for git.md
Last active June 20, 2019 01:20
Script that exports your database schema to files that are included in your git history

Script that exports your database schema to files that are included in your git history This is in the server repository

  • Create a folder in your root directory called "databaseSchema"
  • In that folder create an executable file "export-db-schema.sh"

File Contents

#!/bin/bash
GIT_MYSQL=./schema
// This page demonstrates running multiple functions simultaneously
// and waiting on them to finish.
// Maybe you have an api call that takes 6 seconds...
// And you only need the response at the end
// Would you like to start a function and check if the promise is resolved later?
// Then check out the async/await and the promiseAll functions
main();
# add the line to /etc/default/grub
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
update-grub
# enable the getty for com1 (a reboot may be needed)
systemctl enable [email protected]
systemctl start [email protected]
systemctl daemon-reload
# on a client machine
# this disables the graphical login - use startx to start X
vi /etc/default/grub
# change to
GRUB_CMDLINE_LINUX_DEFAULT="text"
update-grub
# from the CLI
systemctl set-default multi-user.target
# to fix vi arrow keys
@DarinDev1000
DarinDev1000 / ngrok-setup-script.sh
Created February 12, 2019 05:18
Script to setup ngrok for ssh connection on Linux
#!/bin/bash
# ngrok-setup-script.sh
#
# Script to setup ngrok for ssh connection
#
# For Linux
#
# Requires wget, unzip, and screen installed
echo 'Create and ngrok account at ngrok.com'
@DarinDev1000
DarinDev1000 / index.html
Created January 29, 2019 21:54
Typed.js 404 Page
<div class="hero">
<div class="inner-text">
<p class="p1">404:</p>
<p class="p2">Error</p>
</div>
</div>