Skip to content

Instantly share code, notes, and snippets.

View jaywon's full-sized avatar

Jason Sewell jaywon

View GitHub Profile
@jaywon
jaywon / README.md
Last active September 5, 2017 08:11
Windoze User Management cmd.exe Notes

Launch cmd from Powershell with "Run as adminstrator"

runas /noprofile /user: "laptop-mpm8opo3\cyber dev" cmd

Add user with cmd.exe (Run as administrator)

net user /add demo

Remove user with cmd.exe (Run as administrator)

net user /delete demo

Add user to Administrator group (Administrators) from Users group (Standard User)

@jaywon
jaywon / STEPS.md
Created January 26, 2017 10:56
Install Scratch on Ubuntu 14.04

Download the Adobe Air and Scratch files from:

https://scratch.mit.edu/scratch2download/

The following libraries are needed:

sudo apt-get install libxt6:i386 libnspr4-0d:i386 libgtk2.0-0:i386 libstdc++6:i386 libnss3-1d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386

Now you have to create a symbolic link to your gnome keyring:

@jaywon
jaywon / README.md
Created December 7, 2016 21:56
Project README example

###Button Clicker Madness In this project, we will be working with some basic JavaScript and HTML concepts to understand how we can attach functionality to our User Interface.

###Objective To create a simple working application using, HTML Elements, JavaScript Logic and Events to create a button on our web page and when the user clicks on that button, they will receive a visual indicator that they clicked the button.

###Requirements To complete this project you will need the following:

  • Sublime Text
@jaywon
jaywon / README.md
Last active February 5, 2017 05:42
My Spanish Sayings

Vamos juntos cuando termino - Let's go together when i'm done

Tango que ir - I need to go

Neta? - Really?

Que vamos hacer? - What are we going to do?

Chido - That's cool

@jaywon
jaywon / README.md
Last active November 20, 2016 23:40
Docker Machine Provision and Management Notes
  1. Generate API Key on Digital Ocean, copy locally, set in env variable however you want (export DIGITALOCEAN_ACCESS_TOKEN=xxx)
  2.    docker-machine create \
    
       --driver digitalocean \
    
       --digitalocean-access-token=$DIGITALOCEAN_ACCESS_TOKEN \
       
       --digitalocean-image=debian-8-x64 \
    
    
@jaywon
jaywon / promiseChain.js
Last active November 20, 2016 05:07
Figuring out reject/error handling in multiple method Promise chains
const bluebird = require('bluebird');
function levelOne(){
return new Promise((resolve, reject) => {
console.log('levelOne Promise invoked');
//This will cause unhandled promise rejection warning
// return levelTwo();
//This will reject to inital hander as intended regardless of lower resolve/reject
@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 / INSTRUCTIONS.md
Last active June 17, 2016 22:07
Bootstrap Project Setup
  1. Create new project
    • index.html, /css, /images, /js
  2. Create HTML document in index.html and add <link> tag to local or CDN Bootstrap files.
  3. Create a main <div class='container'> or <div class='container-fluid'> (Rows MUST be in a container)
  4. Create rows with <div class='row'>
  5. Within a row create colums with <div class='col-md-*'> or other column classes(col-xs-, col-sm-, col-md-, col-lg-
  6. Always put content inside new elements within your columns and don't add CSS to Bootstrap elements

NOTE: Always have the structure of:

@jaywon
jaywon / NOTES.md
Last active June 17, 2016 20:51
Key Notes from Art of Monitoring

3 kinds of monitoring:

  • Manual or None
  • Reactive
  • Proactive

Cargo Cult monitoring(Manual) - Only monitoring things that have broken in the past, and repeating steps that have worked in the past to remedy

Reactive monitoring is mostly automatic with some remnants of manual or unmonitored components.

Proactive monitoring is automatic and generated by configuration management.Checks will tend to be more application-centric, with many applications instrumented as part of development. Checks will also focus on measuring application performance and business outcomes rather than just stock concerns like disk and CPU.