Skip to content

Instantly share code, notes, and snippets.

View Ingelheim's full-sized avatar

Lukas Ingelheim Ingelheim

View GitHub Profile
class Dungeon
attr_accessor :player
def initialize(player_name)
@player = Player.new(player_name)
@rooms = []
@monster = Monster.new
# @item = Item.new
end
$(document).ready(function() {
$("img").hover(function(e) {
$(e.target).addClass("hovered");
$("img:not(.hovered)").animate({"opacity": 0.25}, 200);
}, function(e) {
$("img:not(.hovered)").animate({"opacity": 1}, 200);
$(e.target).removeClass("hovered");
});
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
require 'csv'
class NFLGame
def initialize
@people = []
@count = 0
@teams = []
@last_names = []
end
@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>
@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 / 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;
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!)
  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?