Skip to content

Instantly share code, notes, and snippets.

View ricklopez's full-sized avatar

Rick Lopez ricklopez

View GitHub Profile
@ricklopez
ricklopez / gh-pages-deploy.md
Created November 12, 2016 22:36 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@ricklopez
ricklopez / gist:f074095405c78ea839d1542390a4d138
Created November 13, 2016 20:05 — forked from mgedmin/gist:9547214
Setting up a Jenkins slave on Linux
# This is how you add a Jenkins slave
# On master:
sudo -u jenkins -H ssh-keygen
# On slave
adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave
install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave
@ricklopez
ricklopez / device.css
Created May 18, 2017 20:59 — forked from jsoverson/device.css
Quick css hacks to target android/ios
.visible-android {
display:none;
}
.visible-ios {
display:none;
}
.on-device .visible-android, .on-device .visible-android {
display:inherit;
}
.device-ios .visible-android {
@ricklopez
ricklopez / prep.md
Last active February 13, 2023 03:45

Instructions

  1. Fork this Gist
  2. Edit to add your answers
  3. Send to your mentor

No cheating! Be open and honest about what you know.

Practice Questions

Feedback on the course here

Feedback Form

Course Content

  1. A New Metal Model

    a. The Browser is just a piece of software

b. The Browser is made up of several components responsible for

Feedback on the course here

Feedback Form

Course Content

  1. The JavaScript review

    a. JavaScript code is executed in chunks of memory called “Execution Context.”

    b. Execution of our JS code is done in two phases:

Instructions

  1. Fork this Gist
  2. Edit to add your answers
  3. Send to your mentor

No cheating! Be open and honest about what you know.

Practice Questions

Introduction to Software / Web Development

  1. Humans and Written Languages (10 min)
    1. Breaking down the following English sentence.
      1. "Hello, did you know that it is 271 days until my birthday!"
      2. Our eyes and brains have been trained to interpret characters and symbols.
    2. Morse code
      1. We can teach our brains and eyes to interpret other languages
      2. Let's interpret the following message
  2. ... --- ...

Introduction to Software / Web Development

  1. Humans and Written Languages (10 min)
    1. Breaking down the following English sentence.
      1. "Hello. Did you know that it is 271 days until my birthday!"
      2. Our eyes and brains have been trained to interpret characters and symbols.
    2. Morse code
      1. We can teach our brains and eyes to interpret other languages
      2. Let's interpret the following message
  2. ... --- ...

A left rotation operation on an array of size shifts each of the array's elements unit to the left. For example, if left rotations are performed on array , then the array would become .

Given an array of integers and a number, , perform left rotations on the array. Then print the updated array as a single line of space-separated integers.

Input Format

The first line contains two space-separated integers denoting the respective values of (the number of integers) and (the number of left rotations you must perform). The second line contains space-separated integers describing the respective elements of the array's initial state.

Constraints