One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/** | |
* Sort array of objects based on another array | |
*/ | |
function mapOrder (array, order, key) { | |
array.sort( function (a, b) { | |
var A = a[key], B = b[key]; | |
using UnityEngine; | |
using System.Collections; | |
public class CameraShake : MonoBehaviour | |
{ | |
// Transform of the camera to shake. Grabs the gameObject's transform | |
// if null. | |
public Transform camTransform; | |
// How long the object should shake for. |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var dishRouter = express.Router(); | |
dishRouter.use(bodyParser.json()); | |
dishRouter.route('/') | |
.all(function (req, res, next) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
import os | |
import io | |
from PIL import Image | |
from django.core.urlresolvers import reverse | |
from django.conf import settings | |
from rest_framework import status | |
from rest_framework.test import APITestCase |
import React from 'react' | |
import Layout from '../components/layout' | |
import Products from '../components/_products' | |
import IndoorCameras from '../components/_indoorCameras' | |
import OutdoorCameras from '../components/_outdoorCameras' | |
class InstarProducts extends Component { | |
components = { | |
products: Products, |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
using UnityEngine; | |
[ExecuteInEditMode] | |
[RequireComponent( typeof( Camera ) )] | |
public class HorizontalCamera : MonoBehaviour | |
{ | |
private Camera m_camera; | |
private float lastAspect; | |
#pragma warning disable 0649 |