Skip to content

Instantly share code, notes, and snippets.

View jaywon's full-sized avatar

Jason Sewell jaywon

View GitHub Profile
@jaywon
jaywon / Knex-Setup.md
Created February 26, 2020 04:14 — forked from NigelEarle/Knex-Setup.md
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@jaywon
jaywon / Knex-Migrations-Seeding.md
Created February 26, 2020 04:13 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

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!

Creating/Dropping Tables

@jaywon
jaywon / install-docker.md
Created January 4, 2020 22:26 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
@jaywon
jaywon / aws-ec2-redis-cli.md
Created August 14, 2019 09:33 — forked from paladini/aws-ec2-redis-cli.md
AWS redis-cli without redis server on AWS EC2

Setup redis-cli without the whole Redis Server on AWS EC2

This fast tutorial will teach you how to install redis-clion 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

@jaywon
jaywon / Network_Survival_Kit.md
Created July 30, 2019 02:14 — forked from tylernchls/Network_Survival_Kit.md
Network Survival Kit

Networking Survival Kit

Scenario:

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!!!!!!

Your Task:

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.

Required Tooling/Specs

@jaywon
jaywon / README.md
Last active September 6, 2017 19:28 — forked from theRemix/README.md
Networking Research Assignment

Answer these questions

In a sentence, or short paragraph form answer these questions in your own words.

What is your current local ip address?

How did you obtain your local ip address?

What is your network address?

@jaywon
jaywon / ssh-config-github-multiple-deploy-keys
Created August 5, 2016 10:32
Using multiple github deploy keys from a Jenkins instance
# 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/
@jaywon
jaywon / s3_multipart_upload.py
Created June 27, 2016 08:32 — forked from chrishamant/s3_multipart_upload.py
Example of Parallelized Multipart upload using boto
#!/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>]
@jaywon
jaywon / processingAudioDemo.java
Created March 16, 2016 10:38 — forked from anonymous/processingAudioDemo.java
Processing demo visualizing audio input data
import processing.sound.*;
// Declare the processing sound variables
SoundFile sample;
Amplitude rms;
// Declare a scaling factor
float scale = 5.0;
// Declare a smooth factor
@jaywon
jaywon / five_minutes.yml
Created March 9, 2016 06:36 — forked from ryane/five_minutes.yml
five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: user@example.com
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub