I hereby claim:
- I am uesteibar on github.
- I am uesteibar (https://keybase.io/uesteibar) on keybase.
- I have a public key ASC9w11pfSLxQj5zrm2vfF3iYmqBLYYBzfaZAjMtc3p7jwo
To claim this, I am signing this object:
--- | |
- host: "amqp://guest:guest@rabbit" | |
exchange: "/" | |
routing_key: "#" | |
- host: "amqp://guest:guest@rabbit" | |
exchange: "/other-exchange" | |
routing_key: "key.*" |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
talk() { | |
echo -e $1 | |
} | |
hr() { | |
echo -e "\n" | |
} |
Console keynote | |
Apple is presenting its new iTerminal. Of course millions of people will line up in front of apple stores to buy it and they need a new powerful presentation to impress the media. The presentation will be shown using the iTerminal, to show off how cool terminal output can be. | |
They have hired you to create the keynote! | |
Iteration 1: The keynote | |
First, make a text file to store the presentation content ( for example, slides.txt). Each “slide” is one line of text, and the lines of text are divided by four dashes ----. We can assume that each line will not be longer than the width of the screen. It should look like this: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Geolocation</title> | |
</head> | |
<body> | |
<script type="text/javascript"> |
myApp.factory('GithubService', ['$http', '$q', | |
function ($http, $q) { | |
var githubApi = 'https://api.github.com'; | |
var q = $q; | |
return { | |
getUser: function (username) { | |
var deferred = q.defer(); | |
$http.get(githubApi + '/users/' + username).success(function (data) { | |
deferred.resolve(data); | |
}).error(function (err) { |
var gulp = require('gulp'); | |
var jshint = require('gulp-jshint'); | |
var nodemon = require('gulp-nodemon'); | |
var mocha = require('gulp-mocha'); | |
var files = require('./gulp.config')(); | |
gulp.task('jshint', function() { | |
gulp.src(files.dev.js) | |
.pipe(jshint()) |
//Create the database service to manage data storage. | |
//To learn about the $q object and angularjs promises: | |
//http://andyshora.com/promises-angularjs-explained-as-cartoon.html | |
myApp.factory('database', function ($window, $q) { | |
var indexedDB = $window.indexedDB; | |
var db = null; | |
var lastIndexTask = 0; | |
var lastIndexProject = 1; | |
var open = function () { |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setTitle("Title").setMessage("Message") | |
.setNeutralButton("OK", | |
new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, | |
int id) { | |
// ok button press execution code | |
} | |
}).show(); |
// on first activity | |
Intent intent = new Intent(getApplicationContext(), ClassName.class); | |
String name = "name"; | |
intent.putExtra("name", name); | |
startActivity(intent); | |
// on second activity | |
Intent intent = getIntent(); | |
name = intent.getStringExtra("name"); |