Skip to content

Instantly share code, notes, and snippets.

View Ingelheim's full-sized avatar

Lukas Ingelheim Ingelheim

View GitHub Profile

Exercises

Javascript

  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;

Exercises

Javascript

  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;
  1. What command would you run, along with any arguments, to set your name so it shows up in git commits?
git config --global user.name [your full name]

​ 2. What command would you run, along with any arguments, to show the differences in files that are staged from files that are already committed to the repository?

git diff staged

  1. What command would you run, along with any arguments, to set your name so it shows up in git commits?

  2. What command would you run, along with any arguments, to show the differences in files that are staged from files that are already committed to the repository?

  3. What command, along with any arguments, is the shortcut to create a branch and checkout that branch at the same time?

  4. What command would you run, along with any arguments, to get code from the remote repository in order to retrieve and merge it in one step?

  5. What command would you run, along with any arguments, to show all the information available about the remote repository?

  1. What command would you run, along with any arguments, to set your name so it shows up in git commits?

  2. What command would you run, along with any arguments, to show the differences in files that are staged from files that are already committed to the repository?

  3. What command, along with any arguments, is the shortcut to create a branch and checkout that branch at the same time?

  4. What command would you run, along with any arguments, to get code from the remote repository in order to retrieve and merge it in one step?

  5. What command would you run, along with any arguments, to show all the information available about the remote repository?

func application(application: UIApplication,
handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!) -> Void)!) {
// This needs to be done to keep the app busy, before the process is killed bu the phone
var workaround: UIBackgroundTaskIdentifier?
workaround = UIApplication.sharedApplication().beginBackgroundTaskWithExpirationHandler({
UIApplication.sharedApplication().endBackgroundTask(workaround!)
})
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
UIApplication.sharedApplication().endBackgroundTask(workaround!)
@Ingelheim
Ingelheim / directiveRefactoring.js
Created May 15, 2014 13:07
Refactoring of wysiwyg directive
/*global angular */
/*jshint globalstrict:true*/
'use strict';
angular.module('clientApp').directive('qenWysiwygTheOne', ['$timeout', 'qenWysiwygImage', 'imageTagService', function ($timeout, qenWysiwygImage, imageTagService) {
var QenWysiwyg = QEN.directives.QenWysiwyg($timeout, qenWysiwygImage, imageTagService);
var QenPrintWysiwyg = QEN.directives.QenPrintWysiwyg(imageTagService);
RedactorPlugins.qenImage = qenWysiwygImage;
@Ingelheim
Ingelheim / zoo.js
Last active December 18, 2015 11:19 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Animal(name, num_legs) {
this.name = species;
this.num_legs = num_legs;
}
Animal.prototype = {
@Ingelheim
Ingelheim / index.html
Last active December 18, 2015 11:18 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
require 'csv'
class NFLGame
def initialize
@people = []
@count = 0
@teams = []
@last_names = []
end