Create and initialize your a directory for your Express application.
$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
This fast tutorial will teach you how to install redis-cli
on AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli
You are a security professional that has been hired to carry out an investigation into a recent security breach of Arch industries. Upon initial scan of equipment, you have determined their system is severly outdated and contains none of the standard network cli tools and applications you normally have to perform your duties. Guess you will have to build your own!!!!!!
You are to use your knowledge of networking and scripting to build basic networking tools in order to complete your job. Below are your details if you choose to accept.
# When using a CI server, like Jenkins, in conjunction with github, you may wish to use | |
# multiple deploy keys (github-speak for an rsa key pair that has been assigned to a single | |
# repo, rather than a user) to allow Jenkins to pull code from the github repositories | |
# In the example here, where three repos are used, the idea is to take advantage of ssh's config mechanism | |
# For use with Jenkins, do the following: | |
# login to your CI Server | |
sudo su jenkins | |
cd ~/.ssh/ |
#!/usr/bin/env python | |
"""Split large file into multiple pieces for upload to S3. | |
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux | |
box images we need to use boto's multipart file support. | |
This parallelizes the task over available cores using multiprocessing. | |
Usage: | |
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>] |
import processing.sound.*; | |
// Declare the processing sound variables | |
SoundFile sample; | |
Amplitude rms; | |
// Declare a scaling factor | |
float scale = 5.0; | |
// Declare a smooth factor |
--- | |
- hosts: all | |
vars: | |
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx' | |
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx' | |
UBUNTU_COMMON_LOGWATCH_EMAIL: [email protected] | |
ubuntu_common_deploy_user_name: deploy | |
ubuntu_common_deploy_public_keys: | |
- ~/.ssh/id_rsa.pub |