Skip to content

Instantly share code, notes, and snippets.

---
- host: "amqp://guest:guest@rabbit"
exchange: "/"
routing_key: "#"
- host: "amqp://guest:guest@rabbit"
exchange: "/other-exchange"
routing_key: "key.*"

Keybase proof

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:

#!/bin/bash
talk() {
echo -e $1
}
hr() {
echo -e "\n"
}
@uesteibar
uesteibar / terminal-keynote-instructions.txt
Created January 19, 2016 20:30
terminal keynote exercise
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">
@uesteibar
uesteibar / GithubService
Created May 12, 2015 20:54
github angular.js service
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) {
@uesteibar
uesteibar / gulpfile.js
Created April 17, 2015 10:11
Basic gulpfile for node.js
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())
@uesteibar
uesteibar / indexedDBService.js
Last active September 25, 2017 10:55
A basic tasks crud with indexedDB for angular.js
//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 () {
@uesteibar
uesteibar / alertdialog
Last active August 29, 2015 14:13
Android alert builder
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();
@uesteibar
uesteibar / StartActivityIntent
Last active August 29, 2015 14:10
Android StartActivity Intent
// 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");