tag:blogger.com,1999:blog-5130013699332159862024-03-13T18:11:19.664-03:00Cajón de escritorio: recortes y cosas útilesColección de recortes y cosas útiles, simpáticas, interesantes(o las 3!) de Matías Herranz.Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.comBlogger121125tag:blogger.com,1999:blog-513001369933215986.post-60967628797203486962017-02-08T17:03:00.000-03:002017-02-08T17:03:26.120-03:00Advanced AJAX / REST debugging tricks<br />
When you are debugging or working with API interactions, you may find yourself making and monitoring a bunch of request from the browser console.<br />
<br />
Like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-jMJ8HdBO4D0/WJt1OsyA8RI/AAAAAAAALU0/eiVwCU_qhhE10p8vksf9XiLtqHRI0m9YQCLcB/s1600/Screenshot%2B2017-02-08%2B16.44.33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://1.bp.blogspot.com/-jMJ8HdBO4D0/WJt1OsyA8RI/AAAAAAAALU0/eiVwCU_qhhE10p8vksf9XiLtqHRI0m9YQCLcB/s640/Screenshot%2B2017-02-08%2B16.44.33.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You may've noticed the blue line there (plus the url). <b>First trick</b> :)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To get a line like this for every request the site you are looking / debugging performs, as well as one for every AJAX request you make "by hand" (usually, those requests don't get logged by the browser, not they appear on the Network or Timeline tabs), <b>right click on the console and click the "Log XMLHttpRequests" option</b>:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-j66RbHlRw-4/WJt2jGf02OI/AAAAAAAALU8/exEqb0ch0ycNvk9wNXUx1lXg8dAF14ctwCLcB/s1600/Screenshot%2B2017-02-08%2B16.50.07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="384" src="https://1.bp.blogspot.com/-j66RbHlRw-4/WJt2jGf02OI/AAAAAAAALU8/exEqb0ch0ycNvk9wNXUx1lXg8dAF14ctwCLcB/s640/Screenshot%2B2017-02-08%2B16.50.07.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Good one, yet nothing too crazy. Right?</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Well, here's where the plot thickens:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now that you can get all and every each of the requests logged, let's try clicking on the url on the right-side of the blue text and see where it gets us:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-rOtzd7-f_Hs/WJt3PK6M1XI/AAAAAAAALVE/pCn_HTJGyjc7ClXaSc6BAW7TLKFxmK5bQCLcB/s1600/Screenshot%2B2017-02-08%2B16.53.19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://4.bp.blogspot.com/-rOtzd7-f_Hs/WJt3PK6M1XI/AAAAAAAALVE/pCn_HTJGyjc7ClXaSc6BAW7TLKFxmK5bQCLcB/s640/Screenshot%2B2017-02-08%2B16.53.19.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Network activity! Things look promising. Ours is the last one. (here comes the second trick).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Let's right-click the last line -> Copy -> Copy as cURL:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-n_dXDyt6X5E/WJt3jH-jXqI/AAAAAAAALVI/XStGccDGmr8tExaNINFQH5-ctvINwlVYACLcB/s1600/Screenshot%2B2017-02-08%2B16.54.34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="https://3.bp.blogspot.com/-n_dXDyt6X5E/WJt3jH-jXqI/AAAAAAAALVI/XStGccDGmr8tExaNINFQH5-ctvINwlVYACLcB/s320/Screenshot%2B2017-02-08%2B16.54.34.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Getting and idea of where this is going? :)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Let's now open Postman:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Import -> Paste raw text, paste:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-xW9KSYaee9Q/WJt4KzGHgSI/AAAAAAAALVQ/G0sL5VMXGV8dG1_EcpDLOiT2XAewfesOgCLcB/s1600/Screenshot%2B2017-02-08%2B16.56.51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://1.bp.blogspot.com/-xW9KSYaee9Q/WJt4KzGHgSI/AAAAAAAALVQ/G0sL5VMXGV8dG1_EcpDLOiT2XAewfesOgCLcB/s640/Screenshot%2B2017-02-08%2B16.56.51.png" width="568" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Click import and now you have the request the site (or you) made, exported and put together in Postman, all bit and pieces included (yep, all headers too):</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-tROy-Ue--dY/WJt4n5I3fVI/AAAAAAAALVc/-bDh74W-zLIZEGqHBZhIe_uMVHIu7R4_ACLcB/s1600/Screenshot%2B2017-02-08%2B16.59.05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://3.bp.blogspot.com/-tROy-Ue--dY/WJt4n5I3fVI/AAAAAAAALVc/-bDh74W-zLIZEGqHBZhIe_uMVHIu7R4_ACLcB/s640/Screenshot%2B2017-02-08%2B16.59.05.png" width="594" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-lltHPjL-osg/WJt4nwyuhmI/AAAAAAAALVY/32t1TwA-jKA8pLLEYllBWnLgXQhEQQwnQCLcB/s1600/Screenshot%2B2017-02-08%2B16.59.11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://4.bp.blogspot.com/-lltHPjL-osg/WJt4nwyuhmI/AAAAAAAALVY/32t1TwA-jKA8pLLEYllBWnLgXQhEQQwnQCLcB/s640/Screenshot%2B2017-02-08%2B16.59.11.png" width="592" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Neat, right? :)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I found this extremely useful when debugging API interactions and request to and from 3rd party sites with unclear APIs (or not APIs at all). Also very useful to simulate form posting from scripts.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cheers!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com2tag:blogger.com,1999:blog-513001369933215986.post-42428433291157327782016-02-25T15:03:00.001-03:002016-02-25T15:03:24.000-03:00$ git lola<br />
<div class="article-footer" style="-webkit-text-stroke-width: 0px; clear: both; color: black; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: auto; outline: none; padding: 0px; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
</div>
<br />
<div class="article-content entry-content" itemprop="articleBody" style="-webkit-text-stroke-width: 0px; clear: both; color: #333333; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.4; margin: 10px auto 5px; orphans: auto; outline: none; padding: 0px; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<div style="margin: 1em 0px; outline: none; padding: 0px;">
Source (and full credits to): http://blog.kfish.org/2010/04/git-lola.html</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
The best tip I learned at Scott Chacon's talk at linux.conf.au 2010, <a href="http://www.lca2010.org.nz/programme/schedule/view_talk/50282?day=wednesday" style="color: #009eb8; display: inline; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; outline: none; text-decoration: none; transition: color 0.3s;">Git Wrangling - Advanced Tips and Tricks</a> was this alias:</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<blockquote>
<pre> lol = log --graph --decorate --pretty=oneline --abbrev-commit
</pre>
</blockquote>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
This provides a really nice graph of your tree, showing the branch structure of merges etc. Of course there are really nice GUI tools for showing such graphs, but the advantage of <tt>git lol</tt> is that it works on a console or over ssh, so it is useful for remote development, or native development on an embedded board.</div>
<div align="center" style="margin: 1em 0px; outline: none; padding: 0px;">
<img src="http://seq.kfish.org/~conrad/images/blog/201004/git-lola2.png" style="-webkit-border-image: url("data:image/png; border-image-repeat: stretch; border-image-slice: 9; border-image-source: url("data:image/png; border-image-width: 9px; border: 9px none; box-sizing: border-box; display: inline-block; height: auto; margin: 10px auto; max-width: 100%; padding: 8px;" /></div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
It is even nicer when you turn syntax coloring on in git, which also has the advantage of colorizing diff output to warn about bad whitespace.</div>
<div align="center" style="margin: 1em 0px; outline: none; padding: 0px;">
<img src="http://seq.kfish.org/~conrad/images/blog/201004/git-lola-color.png" style="-webkit-border-image: url("data:image/png; border-image-repeat: stretch; border-image-slice: 9; border-image-source: url("data:image/png; border-image-width: 9px; border: 9px none; box-sizing: border-box; display: inline-block; height: auto; margin: 10px auto; max-width: 100%; padding: 8px;" /></div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
To get an idea of a whole project structure, I found myself often running <tt>git lol --all</tt>, where the --all option says to show all branches. I used that often enough that I made a new alias, <tt>git lola</tt>:</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<blockquote>
<pre> lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
</pre>
</blockquote>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
which has the added bonus of making me hum <a href="http://en.wikipedia.org/wiki/Lola_(song)" style="color: #009eb8; display: inline; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; outline: none; text-decoration: none; transition: color 0.3s;">Lola</a> <i>every single day</i>.</div>
<div align="center" style="margin: 1em 0px; outline: none; padding: 0px;">
<audio controls="" src="http://upload.wikimedia.org/wikipedia/en/7/72/Kinks_Lola_1970.ogg"></audio></div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
So, just copy the following into <tt>~/.gitconfig</tt> for your full color <tt>git lola</tt> action:</div>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
<blockquote>
<pre>[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[color]
branch = auto
diff = auto
interactive = auto
status = auto
</pre>
</blockquote>
<div style="margin: 1em 0px; outline: none; padding: 0px;">
</div>
</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-76619678507267882452016-02-19T17:50:00.002-03:002016-02-19T17:50:55.602-03:00From the ground up with GIT<span style="font-size: large;"><br /></span>
<span style="font-size: large;">A continuación el contenido, materiales y otras yerbas de la Tech Meetup "From the ground up with GIT", que di en el Tech Pub de Santex America, en febrero de 2016:</span><br />
<br />
Link al evento: http://www.meetup.com/Tech-Meetup-Santex-Cordoba-Argentina/events/228759107/<br />
<br />
Link a las slides: <a href="https://docs.google.com/a/santexgroup.com/presentation/d/1cLWxXIzzxWueYSrbnJ4FozpirSaCgdaJ8w35dLkIj44/edit?usp=sharing">link</a><br />
<br />
Link a las notas:<br />
<br />
<ul>
<li>Parte #1: <a href="https://docs.google.com/a/santexgroup.com/document/d/1agMeE6xP2zdU1O4QYBDiTnlp2JrcGWuCfACoXJ9a2fM/edit?usp=sharing">link</a></li>
<li>Parte #2: <a href="https://docs.google.com/a/santexgroup.com/document/d/1lHOJF7kWcLLDvxz2cDJv0-1B0ERDQpLQURg6CbQnMGc/edit?usp=sharing">link</a></li>
</ul>
<div>
Link al video de la charla: <a href="https://www.youtube.com/watch?v=CzXkzb6OWLk">link</a></div>
<div>
<br /></div>
<div>
Link a las scripts para generar conflictos: <a href="https://github.com/matiasherranz/git_conflicts_generator">link</a></div>
<div>
<br /></div>
<div>
Graciasmiles a todos/as los/as asistentes por venir y por la tan activa participación, que volvió la charla en algo mucho más divertido y enriquecedor (al menos para mi :) ).</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
¡Salud!</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-15489238644842750332016-02-12T20:45:00.000-03:002016-02-12T20:45:32.962-03:00Tweaking hidden files in Mac OS X<span style="background-color: white; color: #222222; font-family: arial, sans-serif;">Aloha!</span><br />
<div style="color: #222222; font-family: arial, sans-serif;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif;">
Ever wondered how to show/hide hidden files in your Mac OS X in the Finder app?</div>
<div style="color: #222222; font-family: arial, sans-serif;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif;">
If so, let's get right to it:</div>
<div style="color: #222222; font-family: arial, sans-serif;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif;">
Add this two aliases in your ~/.bash_profile file:</div>
<div style="color: #222222; font-family: arial, sans-serif;">
<br /></div>
<blockquote class="tr_bq" style="color: #222222; font-family: arial, sans-serif;">
# Hidden files tweaks<br /><br />alias show_hidden_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'<br />alias hide_hidden_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'</blockquote>
<div style="color: #222222; font-family: arial, sans-serif;">
<div>
<br /></div>
<div>
And that's it!</div>
<div>
<br /></div>
<div>
Now, if you want to show the hidden files, just run this command in the console:</div>
<div>
<br /></div>
<blockquote class="tr_bq">
$ show_hidden_files</blockquote>
<div>
<br /></div>
<div>
And if you want to hide them back:</div>
<div>
<br /></div>
<blockquote class="tr_bq">
$ hide_hidden_files</blockquote>
<div>
<br /></div>
<div>
And that's it! :)</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Cheers!<br /><br /><br />M.-</div>
</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com3tag:blogger.com,1999:blog-513001369933215986.post-9911532643006341772015-10-26T12:58:00.001-03:002015-10-26T12:58:29.111-03:00Aplicaciones para viajeros<h1 dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt; text-align: center;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Columna de tecnología "Juro que no hablo en chino"</span></h1>
<div style="text-align: center;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Aplicaciones para viajeros</span></div>
<h1 dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></h1>
<h3 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">En el segmento "En las nubes" de mi última columna de tecnología del jueves pasado (jueves 22 de octubre de 2015), en Radio Sucesos, hablé de varias aplicaciones para viajeros y prometí pasar la lista.</span></h3>
<h3 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Acá va la lista :)</span></h3>
<h1 dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 10pt;">
<br /></h1>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.tripadvisor.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">TripAdvisor</span></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> “The world’s largest travel site”</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">More than 60 million members and over 170 million reviews and opinions of hotels, restaurants, attractions and other travel-related businesses.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TripCase ofrece a los viajeros una herramienta que organiza y mantiene actualizada toda la información de cada viaje. Mediante tecnología innovadora y conexión a cientos de empresas de viajes, TripCase es la aplicación móvil para gestión de itinerarios con datos precisos y en el momento que más importa.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://moovitapp.com/es/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Moovit</span></a></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Siempre hay una mejor manera de llegar a tu destino. Compara las mejores opciones y rutas en cualquier momento, a cualquier destino, línea o estación con total facilidad</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://www.minube.com/" style="text-decoration: none;"><span style="background-color: yellow; color: #1155cc; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Minube</span></a><span style="background-color: yellow; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: el mundo en el bolsillo</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es una librería online que almacena miles de mini guías generadas por usuarios. Tiene más de 24.000 destinos en unos 200 países. Hay más de 100.000 mini guías gratuitas o a bajo costo para viajeros, a las cuales podés acceder desde cualquier lugar del mundo y en cualquier momento.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Tiene lugares de interés, reseñas de restaurantes en función de tu ubicación actual, consejos y advertencias, etc. Y permite interactuar con otros usuarios de Minube.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://www.travelnerd.com/airports" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">TravelNerd</span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: una guía de aeropuertos en tu iPhone</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es una app que no sólo permite monitorear vuelos sino que, además, podés acceder a información sobre salas de embarque, mapas de los aeropuertos, lugares con wi fi, horarios de tiendas y restaurantes, datos de free shop y más. Además, al usar la aplicación, los usuarios pueden encontrar viajeros que deseen compartir un taxi o intercambiar info sobre formas de viajar desde y hacia el aeropuerto.</span></div>
<b style="font-weight: normal;"><br /><br /></b><br />
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://flysmartapp.com/" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">FlySmart</span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: conocé el aeropuerto al que vas</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Los aeropuertos son fundamentales a la hora del viaje. Lo más probable es que pases un tiempo considerable en estaciones y terminales. ¿Qué mejor que conocer estos lugares de punta a punta? FlySmart te permite hacerlo en poco tiempo. Es una aplicación diseñada para ofrecernos información detallada sobre los aeropuertos de todo el mundo. Incluye desde dónde están ubicadas las tiendas, a qué hora llegan los vuelos hasta y qué servicios disponibles se encuentran dentro del aeropuerto.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://www.zuji.com.sg/destinations/packman/" style="text-decoration: none;"><span style="background-color: yellow; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Zuji Packman</span></a><span style="background-color: yellow; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> te arma la valija</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es, para la mayoría, la parte más odiada de viajar: armar bolsos y valijas, con la presión y la angustia de no olvidarte nada. Para ayudarnos en el tema la agencia online Zuji creó Packman, una app que ayuda a los viajeros a organizar su itinerario, organizar sus valija y compartir horarios de viaje con familia y amigos, para dejar a todo el mundo tranquilo.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">La app permite crear varias listas para empacar, configurar recordatorios personales e, incluso, ver qué metieron en la valija otras personas que fueron a ese destino.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="https://maptia.com/" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Maptia </span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">te acerca los lugares más interesantes -> PARECIDO A TRIP ADVISOR</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es una webapp que funciona como una combinación entre blog y red social. Permite a sus usuarios buscar lugares de acuerdo con las experiencias de los demás en el pasado, además de compartir nuestras experiencias personales en ese destino. Se define como una plataforma para compartir historias sobre lugares.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://www.tripadvisor.com/" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Trip Advisor</span></a></div>
<div dir="ltr" style="line-height: 1.6036363636363637; margin-bottom: 6pt; margin-top: 6pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TripAdvisor, Inc.</span><span style="background-color: white; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is an American travel website company providing reviews of travel-related content. It also includes interactive travel forums.</span></div>
<div dir="ltr" style="line-height: 1.6036363636363637; margin-bottom: 6pt; margin-top: 6pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TripAdvisor was an early adopter of </span><a href="https://en.wikipedia.org/wiki/User-generated_content" style="text-decoration: none;"><span style="background-color: white; color: #0b0080; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">user-generated content</span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. The website services are free to users, who provide most of the content, and the website is supported by an advertising business model.</span><a href="https://en.wikipedia.org/wiki/TripAdvisor#cite_note-autogenerated1-3" style="text-decoration: none;"><span style="background-color: white; color: #0b0080; font-family: Arial; font-size: 10.399999999999999px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: super; white-space: pre-wrap;">[3]</span></a></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="http://www.seatguru.com/" style="text-decoration: none;"><span style="background-color: yellow; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">SeatGuru</span></a><span style="background-color: yellow; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: "prevé" dónde sentarte en el avión</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es una app de TripAdvisor que te permite tener información cleva sobre los asientos de los aviones, desde su proximidad al baño hasta la probabilidad de ser molestado. Podés buscar asientos, ver cuáles son convenientes y cuáles no, brinda información sobre amenities y demás.</span></div>
<b style="font-weight: normal;"><br /></b><br />
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="https://www.waze.com/es/" style="text-decoration: none;"><span style="background-color: yellow; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Waze</span></a><span style="background-color: yellow; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: el tránsito en real time -> DE ACÁ SALE LA INFO DE ACCIDENTES EN GOOGLE MAPS!!</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Waze es una app muy interesante si te vas a mover en auto y con apuro. Tiene información de tráfico alimentada por usuarios, y te pone al tanto al instante sobre problemas de tráfico, accidentes, cortes y otras complicaciones. Su servicio cubre más de 100 países, incluídos Estados Unidos, Canadá, Reino Unido, Italia, Ecuador, Israel y México, entre otros.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="https://play.google.com/store/apps/details?id=com.expedia.bookings&hl=en" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Expedia, un clásico</span></a></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Es una plataforma muy popular para viajeros que tiene su aplicación móvil. Permite encontrar vuelos y alojamiento en nuestro lugar de destino, y tiene la comodidad de poder hacer reservas directamente desde la aplicación. Una de sus mejores virtudes es que está acompañada por una importante comunidad de usuarios y ofrece descuentos especiales en hoteles y vuelos.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="https://itunes.apple.com/us/app/tripomatic-trip-planning-city/id519058033?mt=8" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tripomatic </span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">arma tu viaje por vos</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">¿No tenés tiempo para planear tu viaje o no te gusta armar el plan por las tuyas? Hay apps para viajes que te resuelven el tema. Tripomatic para iPad es una de las más prácticas. Es una aplicación muy sencilla: ingresás tu destino y te arma un itinerario con hoteles, restaurantes y actividades interesantes para hacer. El itinerario, además, se puede compartir en redes sociales o descargarse como PDF.</span></div>
<div dir="ltr" style="line-height: 1.89; margin-bottom: 8pt; margin-top: 8pt;">
<a href="https://thetriptribe.com/" style="text-decoration: none;"><span style="background-color: white; color: #444444; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">The Trip Tribe</span></a><span style="background-color: white; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: encontrá a tu compañero de viaje ideal</span></div>
<span style="background-color: white; font-family: Arial; font-size: 13.3333px; vertical-align: baseline; white-space: pre-wrap;">Si adorás viajar y no tenés compañero de viaje, la era digital te acerca varias alternativas para resolver tu problema. Podés optar por una plataforma como Couchsurfing para obtener hospedaje y potenciales nuevos amigos, o usar un servicio como The Trip Tribe, que te conecta con personas con tus mismos intereses. Basta con crear un perfil social dentro de la app y buscar diferentes viajes. Así encontrarás personas que están interesadas en hacer ese mismo viaje y cotejar ambos perfiles para saber si sos compatible para compartir un viaje. Por ahora, The Trip Tribe no tiene aplicaciones móviles, pero se puede acceder desde la web.</span><br />
<span style="background-color: white; font-family: Arial; font-size: 13.3333px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: Arial; font-size: 13.3333px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: Arial; font-size: 13.3333px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: Arial; font-size: 13.3333px; vertical-align: baseline; white-space: pre-wrap;">Algunas referencias: </span><span style="color: #1155cc; font-family: Arial; font-size: 14.6667px; line-height: 19.32px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://entremujeres.clarin.com/Vacaciones/Aplicaciones-viaje-viajes-turismo-apps-turista-telefono-tablet_0_1334275262.html" style="line-height: 19.32px; text-decoration: none;">link</a></span><br />
<br />Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-69458626714300176872015-08-04T14:20:00.004-03:002015-08-04T14:20:57.400-03:00Pimp my GIT: Improving GIT command line (cli) interface and usageAloha!<br />
<br />
<br />
Following up yesterday's post, here goes another set of tricks I have done to my GIT setup.<br />
<br />
To begin with, add this code to yhe .git/config file of your git repo clone:<br />
<br />
<script src="https://gist.github.com/matiasherranz/6693100.js"></script><br />
<br />
Once you do that, you'll see things like colors when running a "git status":<br />
<br />
<a href="http://4.bp.blogspot.com/-8S_KkS2P74s/UkGKjqWvseI/AAAAAAAABwM/aM3F7JEKP9I/s1600/Screen+Shot+2013-06-13+at+10.45.07+AM.png"><img border="0" src="http://4.bp.blogspot.com/-8S_KkS2P74s/UkGKjqWvseI/AAAAAAAABwM/aM3F7JEKP9I/s1600/Screen+Shot+2013-06-13+at+10.45.07+AM.png" /></a><br />
<br />
<br />
You'lll also be able to use git command shortcuts, like:<br />
<br />
- "git st" instead of "git status"<br />
- "git ci" instead of "git commit"<br />
(etc!)<br />
<br />
<br />
Logs will look much more sexy and colorful.<br />
<br />
You'll see diffs with colors and with a much more user-friendly format:<br />
<br />
<br />
<a href="http://3.bp.blogspot.com/-2cnWg9i3XxA/UkGKt4aInrI/AAAAAAAABwU/G2YRhGrlmzE/s1600/Screen+Shot+2013-06-13+at+10.47.34+AM.png"><img border="0" src="http://3.bp.blogspot.com/-2cnWg9i3XxA/UkGKt4aInrI/AAAAAAAABwU/G2YRhGrlmzE/s1600/Screen+Shot+2013-06-13+at+10.47.34+AM.png" /></a><br />
<br />
<br />
When running "git branch", you'll see the current branch highlighted and the local branches clearly marked in yellow:<br />
<br />
<a href="http://1.bp.blogspot.com/-Uxpof1Fa4ls/UkGK2tRc8QI/AAAAAAAABwc/KZ-Ng4QkLQQ/s1600/Screen+Shot+2013-06-13+at+10.49.06+AM.png"><img border="0" src="http://1.bp.blogspot.com/-Uxpof1Fa4ls/UkGK2tRc8QI/AAAAAAAABwc/KZ-Ng4QkLQQ/s1600/Screen+Shot+2013-06-13+at+10.49.06+AM.png" /></a><br />
<br />
And remote branches in green:<br />
<br />
<img src="https://mail.google.com/mail/u/1/?ui=2&ik=7185471163&view=att&th=13f3dcde2618e3a8&attid=0.2&disp=emb&realattid=ii_13f3dcd4be60bd29&zw&atsh=1" /><br />
<br />
<br />
That's all for today, folks!<br />
<br />
<br />
Cheers!Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-60471432024335685602015-08-03T21:48:00.000-03:002015-08-03T21:48:37.202-03:00Setting sail towards an awesome GIT experience<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
Here goes a bundle of tricks and treats for a better GIT experience:</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<br /></div>
<div>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">Some years ago I found something like that I'm going to show you and, eventually, I assembled a series of scripts (some things I did, some things that I found on the web); they do various things with bash, which are sweet.</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">What things?</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<br />
<ul>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">Automatically detects if you are in a folder belonging to a git repo, and, in the case it is, the prompt display relevant information that is repo: branch and state. Example:</span></li>
</ul>
<br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-_rbnFjqiNII/UkFt35QzXvI/AAAAAAAABvw/0e1tJZDjfyw/s1600/image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-_rbnFjqiNII/UkFt35QzXvI/AAAAAAAABvw/0e1tJZDjfyw/s1600/image.png" /></a></div>
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
In this case depicted, I was on the branch "master" and I had modified files (hence the "m") and files I deleted (hence the "d").</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<br /></div>
<div>
<br />
<ul>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;"> Another cool thing is to have tab completion (that pressing the tab key with a half-written command you get all the options to complete the command -or the command being automatically completed if there was just one choice-).</span></li>
</ul>
<div>
<br /></div>
<br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">Imagine that applied to branch names, git commands and Django commands (like "python manage.py runserver" for example). Sweet, isn't it?</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<br />
<ul>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">Some other sweetnesses included:</span></li>
</ul>
<ul><ul>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">Increase the size of the history of bash, but eliminating duplicates, so to do "ctrl r" in the console, we can look at the history of the commands that we did and found interesting results.</span></li>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">A long list of colors defined to directly save them in defining the prompt.</span></li>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">Etc!</span></li>
</ul>
</ul>
</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<br /></div>
<div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
The scripts, give me the scripts!</div>
<ul>
<li><span style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">Here you are:</span></li>
<ul>
<li>.git_completion.sh: <a href="https://gist.github.com/matiasherranz/6683058">https://gist.github.com/matiasherranz/6683058</a></li>
<li>.django_bash_completion: <a href="https://gist.github.com/matiasherranz/6683069">https://gist.github.com/matiasherranz/6683069</a></li>
<li>.bash_profile / .profile / .bashrc : <a href="https://gist.github.com/matiasherranz/6683083">https://gist.github.com/matiasherranz/6683083</a></li>
</ul>
</ul>
</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: 12px;">
<br /></div>
<div>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">The first two put them right into your home folder.</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">The third file, call it the way your system get it right. For me it is .bash_profile. Put it right in your home with this name or copy its contents to your existing bash config file.</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">If you use Linux, you can do the same with .bashrc.</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><b>Note that</b> the files have an underscore in the beginning of their filenames. Remove this underscore when placing the files, letting the names begin with a dot, as they are hidden files.</span></span><br />
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;"><br /></span></span>
<span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12px;">Cheers and May the bash be with you!!</span></span></div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-8542391573745460732015-05-19T17:44:00.003-03:002015-05-20T13:02:57.601-03:00REST with Python: awesome API development tools and docs<h2 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Here goes a collection of links I find very useful to keep handy regarding RESTful APIs and Python:</span></h2>
<div>
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Frameworks/libraries</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://eve.readthedocs.org/en/stable/index.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">eve: Python REST API Framework</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (Flask, MongoDB and Redis)</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/kalasjocke/hyp" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Partial JSON API implementation in Python</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/coltonprovias/sqlalchemy-jsonapi" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">JSONAPI implementation for use with SQLAlchemy</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.django-rest-framework.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Django REST framework</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://django-tastypie.readthedocs.org/en/latest/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Tastypie (for Django)</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://flask-restful.readthedocs.org/en/latest/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Flask-RESTful</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.flaskapi.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Flask API</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (lots of future and nice projection, not the best documentation)</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://flask-restless.readthedocs.org/en/latest/index.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Flask-Restless</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (only for SQLAlchemy, but with a lot of features like pagination, filters, pre/post-processors, etc.)</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/toastdriven/restless" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Restless</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is a lightweight API framework that aims to be framework agnostic.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/Julian/jsonschema" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Implementation of JSON Schema for Python</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.narwhl.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">A Practical API Design Framework</span></a></div>
</li>
</ul>
<b id="docs-internal-guid-a93ce6cd-6de8-15e4-f8c8-63e4ca8869b7" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Videos/blog posts/Tutorials</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://speakerdeck.com/nicola/developing-restful-web-apis-with-python-flask-and-mongodb" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Developing RESTful Web APIs with Flask and mongodb</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (from the author of eve).</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://urthen.github.io/2013/05/09/ways-to-version-your-api/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Versioned and versionless APIs</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://blog.luisrei.com/articles/rest.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Designing a RESTful Web API</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/interagent/http-api-design#foundations" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">HTTP API Design Guide</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.restapitutorial.com/lessons/whatisrest.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">REST API Tutorial</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/18f/api-standards" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">18F API Standards</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.youtube.com/watch?v=5WXYw4J4QOU" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Designing a Beautiful REST+JSON API</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (</span><a href="https://medium.com/@zwacky/design-a-beautiful-rest-api-901c73489458" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">blog post</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">)</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Others</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://github.com/zatosource/zato-apitest" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">API Testing for Humans</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Very good/interesting: </span><a href="http://raml.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://raml.org/</span></a><span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> Tools: </span><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://raml.org/projects.html" style="text-decoration: none;">http://raml.org/projects.html</a></span></div>
</li>
<li dir="ltr" style="background-color: transparent; list-style-type: disc; vertical-align: baseline;"><span style="color: #222222; font-family: Arial;"><span style="font-size: 15px;">http://www.intridea.com/blog/2010/4/29/rest-isnt-what-you-think-it-is</span></span></li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Dealing with speed</span></div>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">json, from the Python standard library, is slow and performance can be improved using </span><a href="https://github.com/esnme/ultrajson" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">ujson</span></a></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #222222; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">SQLAlchemy has an option to cache connections: connection pool.</span></div>
</li>
</ul>
<div>
<span style="color: #222222; font-family: Arial;"><span style="font-size: 15px; line-height: 20.7000007629395px; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="color: #222222; font-family: Arial;"><span style="font-size: 15px; line-height: 20.7000007629395px; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="color: #222222; font-family: Arial;"><span style="font-size: 15px; line-height: 20.7000007629395px; white-space: pre-wrap;">Special thanks to Juan Norris for creating and letting me share the original document here.</span></span></div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-47481128245606218892015-03-09T12:54:00.001-03:002015-03-09T12:54:26.287-03:00Reset the DNS cache in OS X<h1 id="main-title" itemprop="headline" style="background-color: white; color: #333333; font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 40px; font-weight: 200; letter-spacing: -1px; line-height: 1.1; margin: 50px 0px 0px; padding: 0px;">
Reset the DNS cache in OS X</h1>
<div class="intro" style="background-color: white; color: #333333; font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 18px; line-height: 26.1000003814697px; margin: 0px; padding: 0px;">
<div style="color: #666666; font-size: 24px; line-height: 1.3542; margin-bottom: 0.5em; margin-top: 0.5em; padding: 0px 0px 1px;">
Learn how to reset (flush) the DNS cache.</div>
</div>
<div itemprop="author" itemscope="" itemtype="http://schema.org/Organization" style="background-color: white; color: #333333; font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 18px; line-height: 26.1000003814697px; margin: 0px; padding: 0px;">
</div>
<div id="sections" itemprop="articleBody" style="background-color: white; color: #333333; counter-reset: steps-counter 0; font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 18px; line-height: 26.1000003814697px; margin: 0px; padding: 0px;">
<section class="" style="width: auto;"><h2 style="font-size: 32px; font-weight: 200; line-height: 1.15; margin: 1.2em 0px 0px; padding: 0px;">
About the DNS cache</h2>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server. Sometimes it might be necessary to reset the cache immediately and re-query a DNS server. For example, you might need to do this if you are a network or server administrator and an entry on your DNS server has recently changed.</div>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
If your Mac isn't using the latest DNS entries from your server, you can restart your Mac to update its cached information. If you need to update DNS entries on a server using OS X and you can't restart the server, use the terminal commands below for the version of OS X you're using.</div>
<section class="" style="width: auto;"><h3 style="font-size: 28px; font-weight: 200; line-height: 1.15; margin: 1.2em 0px 0px; padding: 0px;">
OS X Yosemite</h3>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
Use the following Terminal command to reset the DNS cache:</div>
<pre style="background-color: #fafbfc; border: 1px solid rgb(222, 222, 222); color: #666666; font-size: 16px; margin-top: 1em; overflow: auto; padding: 8px;">sudo discoveryutil mdnsflushcache
</pre>
</section><section class="" style="width: auto;"><h3 style="font-size: 28px; font-weight: 200; line-height: 1.15; margin: 1.2em 0px 0px; padding: 0px;">
OS X Mavericks, Mountain Lion, and Lion</h3>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
Use the following Terminal command to reset the DNS cache:</div>
<pre style="background-color: #fafbfc; border: 1px solid rgb(222, 222, 222); color: #666666; font-size: 16px; margin-top: 1em; overflow: auto; padding: 8px;">sudo killall -HUP mDNSResponder
</pre>
</section><section class="" style="width: auto;"><h3 style="font-size: 28px; font-weight: 200; line-height: 1.15; margin: 1.2em 0px 0px; padding: 0px;">
Mac OS X v10.6</h3>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
Use the following Terminal command to reset the DNS cache:</div>
<pre style="background-color: #fafbfc; border: 1px solid rgb(222, 222, 222); color: #666666; font-size: 16px; margin-top: 1em; overflow: auto; padding: 8px;">sudo dscacheutil -flushcache
</pre>
<div style="margin-top: 1em; padding: 0px; word-wrap: break-word;">
<br /></div>
</section></section></div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-28652460909396352732014-10-16T10:18:00.000-03:002014-10-16T10:18:59.400-03:00How to undo a git rebase / squash / fixup? (a.k.a. "we all poop it sometimes")<br />
<div>
<br /></div>
<div>
Today I had a bit of a mess in one of my PRs by doing an interactive rebase (git rebase -i HEAD~<number commits="" of="">) and a fixup / squash.</number></div>
<div>
<br /></div>
<div>
Now: What to do now, after doing the wrong squash?</div>
<div>
<br /></div>
<div>
Good news: virtually everything can be undone in GIT :)</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">"git reflog"</span> was what I was looking for to put thing where they were before:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ git reflog</span></div>
<div>
<br /></div>
<div>
At this point you'll see a long list of commits like this one:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> $ git reflog</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">e074e05 HEAD@{0}: rebase: aborting</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">b3885fe HEAD@{1}: rebase -i (start): checkout HEAD~7</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">e074e05 HEAD@{2}: pull origin master: Merge made by the 'recursive' strategy.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">b3885fe HEAD@{3}: rebase -i (finish): returning to refs/heads/ticket</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">b3885fe HEAD@{4}: rebase -i (pick): something</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">....</span></div>
<div>
<br /></div>
<div>
Then you need to pick the action you want to go back to and reset to it with this command:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ git reset --hard HEAD@{N}</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
Where "N" is the number between curly braces from the list of commits displayed by <span style="font-family: Courier New, Courier, monospace;">git reflog</span>.</div>
<div>
<br /></div>
<div>
Et voilà!</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-77689035931701309892014-09-26T13:00:00.000-03:002014-09-26T13:00:08.424-03:00Get file extension from filename with Python<br />
Several times I had to put some code together some Python code to get the extension from a filename.<br />
<br />
It was required for it to work OK with complex extensions, like ".tar.gz", and remain functional when you have dots in the filename, like in this case: "some.filename.1.v2.tar.gz".<br />
<br />
After trying several options, the one that did the trick was using regular expressions, wrapped in a little function.<br />
<br />
Here the case for keeping the ".", and getting the extension in the fashion ".tar.gz" or ".png":<br />
<br />
<script src="https://gist.github.com/matiasherranz/9a4f2a2cb2d03aced6a4.js"></script><br />
<br />
Here the case for not keeping the ".", and getting the extension in the fashion "tar.gz" or "png":<br />
<br />
<script src="https://gist.github.com/matiasherranz/3230dce4483b1119aca6.js"></script><br />
<br />
<br />
Et voilà! :DMatíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-18439283395282467482014-08-15T16:58:00.003-03:002014-08-15T16:58:46.066-03:00Smile, it's Friday :D<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-zN-AmA3P5XM/UYzl-OBUaVI/AAAAAAAAAww/owbcxs_l9_0/s1600/smile-its-friday.gif#.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-zN-AmA3P5XM/UYzl-OBUaVI/AAAAAAAAAww/owbcxs_l9_0/s1600/smile-its-friday.gif#.png" height="214" width="320" /></a></div>
<br />Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-84615553852646251442014-08-15T13:13:00.002-03:002014-08-15T13:13:33.988-03:00The geekiest pin numbers<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.imgur.com/5rn3qY2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.imgur.com/5rn3qY2.jpg" /></a></div>
<br />Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-36527318117862930712014-07-10T17:42:00.002-03:002014-07-10T17:42:37.393-03:00E2E testing with Protractor for AngularJS: Switch to iframe context in order to see inside iframeLittle useful tip:<br />
<br />
<br />
<blockquote class="tr_bq">
// Switch to iframe context in order to see inside iframe<br />browser.switchTo().frame(element(by.tagName('iframe')));</blockquote>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-58736655996298500072014-06-26T20:52:00.002-03:002014-06-26T20:52:39.206-03:00How to revive Mac App Store when its stuck forever waiting...<br />
<h3 class="post-title entry-title" style="background-color: white; color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 15px; line-height: 1.1em; margin: 0px; padding: 0px;">
<a href="http://scheyeniam.blogspot.com.ar/2011/08/how-to-revive-mac-app-store-when-its.html" style="color: #333333; text-decoration: none;">How to revive Mac App Store when its stuck forever waiting...</a></h3>
<div class="post-header" style="background-color: white; color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 12px; line-height: 1.3em; margin: 0px 0px 0.75em;">
<div class="post-header-line-1" style="line-height: 1.3em; margin: 0px 0px 0.75em;">
</div>
</div>
<div class="post-body entry-content" style="background-color: white; color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 12px; line-height: 1.3em; margin: 0px 0px 0.75em;">
I recently went to the App Store application on my Mac to download the Lion version of Apple's Xcode development tools. I was prompted for my Apple ID and password (which I provided) and then I left the App Store app on its own to complete the download and install. After about 30 minutes I went to check in on its progress and saw that it had downloaded exactly 0 bytes. The status on the Purchased page was Waiting...<br /><div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 1px solid rgb(204, 204, 204); margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="http://3.bp.blogspot.com/-M8fQBgK2lHY/TkFDMbyvJYI/AAAAAAAAAIM/EaEfopiv-GI/s1600/Screen+Shot+2011-08-09+at+10.21.14+AM.png" imageanchor="1" style="color: #336699; margin-left: auto; margin-right: auto;"><img border="0" height="90" src="http://3.bp.blogspot.com/-M8fQBgK2lHY/TkFDMbyvJYI/AAAAAAAAAIM/EaEfopiv-GI/s640/Screen+Shot+2011-08-09+at+10.21.14+AM.png" style="border: none; padding: 0px;" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10px;">Waiting for Godot</td></tr>
</tbody></table>
<div class="separator" style="clear: both; line-height: 1.3em; margin: 0px 0px 0.75em; text-align: center;">
<br /></div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
...and waiting and waiting. I quit and restarted App Store and still my downloads were stuck waiting. I dug around a little and it turns out this is not an uncommon problem but the remedies suggested were all over the place. Everything from installing updates and deleting caches (both good ideas) to deleting your Library folder (not a good idea). I like to attack problems like this by starting with the easiest and least invasive measures.<br /><br />I should state right off the bat that these solutions are meant to incur as little disruption as possible but do require the use of some programs that might not be in your usual repertoire: Activity Monitor and Terminal. If you are at all uncomfortable using these tools you can always use that old Windows chestnut... reboot. Yes, rebooting your Mac should have the same affect as solution 1 at least. But if you don't want the hassle of rebooting then read on.<br /></div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
<a href="http://2.bp.blogspot.com/-y3ABwbOb2TQ/TkFQb2GSCEI/AAAAAAAAAIU/yjZWLEZWoJM/s1600/Screen+Shot+2011-08-09+at+11.02.33+AM.png" imageanchor="1" style="clear: right; color: #336699; float: right; margin-bottom: 1em; margin-left: 1em;"><br /></a><br /><b>Solution 1: Kill the Zombie</b><br /><br />The App Store uses a process called "storeagent" that runs continuously in the background. It seems that sometimes this process can go a little wonky and fail to respond to requests to download app purchases. What we want to do is kill this zombie process (it will start up again automatically).<br /><br /><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 1px solid rgb(204, 204, 204); float: right; margin-left: 1em; padding: 4px; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-y3ABwbOb2TQ/TkFQb2GSCEI/AAAAAAAAAIU/yjZWLEZWoJM/s1600/Screen+Shot+2011-08-09+at+11.02.33+AM.png" imageanchor="1" style="clear: right; color: #336699; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="179" src="http://2.bp.blogspot.com/-y3ABwbOb2TQ/TkFQb2GSCEI/AAAAAAAAAIU/yjZWLEZWoJM/s200/Screen+Shot+2011-08-09+at+11.02.33+AM.png" style="border: none; padding: 0px;" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10px; text-align: center;">Start Activity Monitor</td></tr>
</tbody></table>
First, quit the App Store application (e.g. by selecting "App Store->Quit App Store" or pressing Cmd-Q or click the red dot in the top left corner of the window). Start up<i>Activity Monitor</i> (you'll find it on Lion's launchpad in the Utilities collection or using Finder in Applications/Utilities/Activity Monitor. Activity monitor is used to display the processes running on your Mac. You could go hunt around for the process called "storeagent" but an easier method is to enter "storeagent" in the Activity Monitor filter box as illustrated below (some of the numbers will be different). Highlight the "storeagent" process by clicking on it. The "Quit Process" stop sign should become available. Go ahead and click on Quit Process to kill "storeagent". You'll be asked if you really want to quit the process. Confirm by clicking "Quit". Normally this should do the trick and the process will disappear immediately and be replaced a little while later by a new process (with a different number in the PID column). However, if the process is a deep zombie, you will need to click "Force Quit" in the confirmation dialog. Do this only as a last resort as it is possible to damage system files by using Force Quit too often. </div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
<br /></div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 1px solid rgb(204, 204, 204); margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="http://2.bp.blogspot.com/-ZKUHbTfWh9I/TkFRUiKIu4I/AAAAAAAAAIY/6cfasoSICwE/s1600/Screen+Shot+2011-08-09+at+10.58.34+AM.png" imageanchor="1" style="color: #336699; margin-left: auto; margin-right: auto;"><img border="0" height="145" src="http://2.bp.blogspot.com/-ZKUHbTfWh9I/TkFRUiKIu4I/AAAAAAAAAIY/6cfasoSICwE/s640/Screen+Shot+2011-08-09+at+10.58.34+AM.png" style="border: none; padding: 0px;" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10px;">Activity Monitor Filtered for "storeagent". Note the "Quit Process" stop sign is now clickable.</td></tr>
</tbody></table>
</div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
Now go ahead and restart the App Store application. Click on Purchased, find your purchase and select Resume. After you enter your Apple ID and password your purchase should start downloading. However, if the App Store is still stuck in Waiting move on to Solution 2.<br /><br /><b>Solution 2 - Purge the Caches</b><br /><br />Solution 1 has always worked for me but I've heard of cases where more intervention is required. If this fits your situation then go ahead and quit the App Store application again. Now we do some typing into Terminal. You can find Terminal in the same Utilities folder that you found Activity Monitor. When you start it, it should look something like below.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 1px solid rgb(204, 204, 204); margin-left: auto; margin-right: auto; padding: 4px; text-align: center;"><tbody>
<tr><td><a href="http://1.bp.blogspot.com/-zF36ZL5fs4A/TkFWPLXSZ6I/AAAAAAAAAIc/ayBRTJXMvfY/s1600/Screen+Shot+2011-08-09+at+11.45.39+AM.png" imageanchor="1" style="color: #336699; margin-left: auto; margin-right: auto;"><img border="0" height="317" src="http://1.bp.blogspot.com/-zF36ZL5fs4A/TkFWPLXSZ6I/AAAAAAAAAIc/ayBRTJXMvfY/s400/Screen+Shot+2011-08-09+at+11.45.39+AM.png" style="border: none; padding: 0px;" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10px;">At the Terminal prompt</td></tr>
</tbody></table>
What we're going to do is use some commands to delete App Store caches. You do not need to worry about deleting these files since, by definition, they are a copy of what is already stored on the Apple servers and will automatically be restored. Type of the following commands <b>exactly as you see below </b>(in fact, go ahead and copy and paste them into Terminal).<br /><br /><pre>rm -r ~/Library/Caches/com.apple.appstore
rm -r ~/Library/Caches/com.apple.storeagent
rm ~/Library/Preferences/com.apple.appstore.plist
rm ~/Library/Preferences/com.apple.storeagent.plist
rm ~/Library/Cookies/com.apple.appstore.plist
</pre>
<br />Now go and do the steps in Solution 1 again. Once you're done that, start up App Store, go to Purchases, and select Resume on your download. Enter your Apple ID and password and you're off to the races.</div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
<br /></div>
<div style="line-height: 1.3em; margin: 0px 0px 0.75em;">
Source: http://scheyeniam.blogspot.com.ar/2011/08/how-to-revive-mac-app-store-when-its.html?spref=bl</div>
</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com4tag:blogger.com,1999:blog-513001369933215986.post-76190838438545238252014-06-26T20:49:00.003-03:002014-06-26T20:49:55.765-03:00How to merge two folders in Mac OS X or Linux<h3 style="background-color: white; border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 15px; margin: 0px 0px 5px; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<br /></h3>
<h3 style="background-color: white; border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 15px; margin: 0px 0px 5px; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
Short answer</h3>
<div>
<br /></div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Using the command line (Terminal):</div>
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">cp -r -n ~/Desktop/src/* ~/Desktop/destination/
</code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
The command above adds the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">src</code> content and the subdirectories to the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code> without overwriting the content already present in the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code>.</div>
<h3 style="background-color: white; border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 15px; margin: 0px 0px 5px; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
Long answer</h3>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Even if the content overlaps, you can still use <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">cp</code> to do it. Assume that you have two folders on your desktop: the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">src</code> and the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code> folders and you want to merge <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">src</code> into <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code>:</div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<img alt="enter image description here" src="http://i.stack.imgur.com/K7aNP.png" style="border: 0px; margin: 0px; max-width: 630px; padding: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
To merge, just do:</div>
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">cp -r ~/Desktop/src/* ~/Desktop/destination/
</code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">NOTE</strong> When you use this, the content in <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">src</code> overwrites the content in the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code> folder and adds the extra stuff that are missing in the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code>. It shouldn't matter if you just want to add the missing files from <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">src</code> into <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code>.</div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">ALSO</strong> it doesn't matter how many subdirectories are there, it will just go through each folder recursively and it will overwrite the content and will add the stuff that is missing in the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">destination</code> folder.</div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">BUT</strong></div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">PITFALL</strong> If you have huge files (like video files), you don't want to wait until everything is overwritten, it adds a lot of overhead.</div>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">PITFALL SOLUTION</strong>: Instead, you can use the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">-n</code> flag to skip the overwriting:</div>
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">cp -r -n ~/Desktop/src/* ~/Desktop/destination/
</code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
This is the description of the <code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">-n</code> flag from the man page:</div>
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">man cp
</code></pre>
<blockquote style="background-color: #f0f0f0; border-left-color: rgb(204, 204, 204); border-left-style: dotted; border-width: 0px 0px 0px 1px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin: 0px 0px 10px; padding: 10px 10px 1px; quotes: none; vertical-align: baseline;">
<pre style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"> -n Do not overwrite an existing file. (The -n option overrides any
previous -f or -i options.)
</code></pre>
</blockquote>
<div style="background-color: white; border: 0px; clear: both; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Further Reading</strong></div>
<ol style="background-color: white; border: 0px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;">
<li style="border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 16px; margin: 0px 0px 7px; padding: 0px; vertical-align: baseline; word-wrap: break-word;"><a href="http://stackoverflow.com/questions/5088332/overhead-of-a-flag-in-cp-command" style="border: 0px; color: #71a8d5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://stackoverflow.com/questions/5088332/overhead-of-a-flag-in-cp-command</a></li>
</ol>
<strong style="border: 0px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 19.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;">Source:</strong><div>
<span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 16px;"><br /></span></div>
<div>
<ol>
<li><a href="http://apple.stackexchange.com/questions/107152/where-did-folder-merge-or-keep-both-go-in-os-x-10-9-mavericks" style="background-color: white; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; font-size: 14px; line-height: 16px;">http://apple.stackexchange.com/questions/107152/where-did-folder-merge-or-keep-both-go-in-os-x-10-9-mavericks</a></li>
</ol>
</div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com1tag:blogger.com,1999:blog-513001369933215986.post-41720298366682893282014-04-30T13:24:00.001-03:002014-04-30T13:24:32.163-03:00Tech Meetup en Santex: slides y código de la charla<div class="separator" style="clear: both; text-align: center;">
<a href="https://pbs.twimg.com/media/Bl_zA_WCIAEJ32l.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://pbs.twimg.com/media/Bl_zA_WCIAEJ32l.png" /></a></div>
<br />
Acá comparto el material de la Tech Meetup que di en Santex la semana pasada.<br />
<br />
Slides: <a href="http://talks.matiasherranz.com/STX_Tech_Meetup_Django/Presentation.html" target="_blank">Link</a>.<br />
Código fuente de proyecto de ejemplo: <a href="https://github.com/matiasherranz/tech_meetup_django">https://github.com/matiasherranz/tech_meetup_django</a><br />
<br />Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-26443205342274194722014-04-07T13:23:00.000-03:002014-04-07T13:23:30.944-03:00Installing MySQL-Python in Mac OS X MavericksIf you are in Mac OS X Mavericks and while trying to install MySQL-Python you run into this error:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/10023463.js"></script><br />
<br />
This is a what makes the trick:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/10023489.js"></script><br />
<br />
Then, pip works its way towards installing MySQL-Python OK:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/10023503.js"></script><br />
<br />
Voilà!Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-46565918621049798672014-03-26T13:05:00.000-03:002014-03-26T13:05:24.242-03:00Create a global GIT hook to check Flake8 before each commit<h2>
First, let's install Flake8:</h2>
<br />
<script src="https://gist.github.com/matiasherranz-santex/9785870.js"></script><br />
<br />
Note It is important to set the right version when installing Flake8, as there there are some versions that are bugged and will prevent the GIT hook to work (like the 2.1.0 version).<br />
<h2>
Now, let's setup global git commit hooks:</h2>
<h3>
1. Enable git templates:</h3>
<script src="https://gist.github.com/matiasherranz-santex/9785895.js"></script><br />
<br />
This tells git to copy everything in ~/.git-templates to your per-project .git/ directory when you run git init<br />
<h3>
2. Create a directory to hold the global hooks:</h3>
<script src="https://gist.github.com/matiasherranz-santex/9785906.js"></script><br />
<br />
<h3>
3. Write your hooks in ~/.git-templates/hooks.</h3>
For example, here's a post-commit hook (located in ~/.git-templates/hooks/post-commit):<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/9785920.js"></script><br />
<br />
<h3>
4. Make sure the hook is executable.</h3>
<script src="https://gist.github.com/matiasherranz-santex/9785930.js"></script><br />
<br />
<h3>
5. Re-initialize git in each existing repo you'd like to use this in:</h3>
<script src="https://gist.github.com/matiasherranz-santex/9785941.js"></script><br />
<br />
<br />
<b>NOTE</b> if you already have a hook defined in your local git repo, this will not overwrite it.<br />
<br />
<h2>
Now, let's create a global git pre-commit hook:</h2>
<div>
<script src="https://gist.github.com/matiasherranz-santex/9786020.js"></script></div>
<div>
<br /></div>
<div>
<h2>
Finally, let's take it for a spin!</h2>
</div>
<div>
Go to some of your repos and re-initialize it to take the pre-commit hook:</div>
<div>
<br /></div>
<div>
<script src="https://gist.github.com/matiasherranz-santex/9785941.js"></script></div>
<div>
<br /></div>
<div>
Now edit some of your Python files, introducing some violation (like a >80 columns line, only one blank line between function/class definitions, etc.) and try to commit it:</div>
<div>
<br /></div>
<div>
<script src="https://gist.github.com/matiasherranz-santex/9786724.js"></script></div>
<div>
<br /></div>
<div>
Voilà!</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0Avenida Vélez Sarsfield 564, Córdoba, Cordoba, Argentina-31.421924699999991 -64.189825999999982-31.421977699999992 -64.189904999999982 -31.42187169999999 -64.189746999999983tag:blogger.com,1999:blog-513001369933215986.post-44490888126357179212014-01-08T17:25:00.000-03:002014-01-08T17:25:02.954-03:00Custom sorting function as parameter to sorted() in Python<br />
So, I am working with Python and I come across a list of image names, and I'd like to have them sorted. So, I call the <span style="font-family: Courier New, Courier, monospace;">sorted</span> function with this list:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/8323780.js"></script><br />
<br />
HA! It doesn't work as I would have liked it to. So, what can we do to achieve the sorting of the list as we want it?<br />
<br />
Python's standard library sorted function, as you can see <a href="https://wiki.python.org/moin/HowTo/Sorting#The_Old_Way_Using_the_cmp_Parameter" target="_blank">here</a>, has an optional <span style="font-family: Courier New, Courier, monospace;">cmp</span> parameter, through which you can pass a custom comparison function.<br />
<br />
Going back to my example, I needed the images to be compared by the number in their name. I made this little function to achieve this goal:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/8323902.js"></script><br />
<br />
And now let's put altogether:<br />
<br />
<script src="https://gist.github.com/matiasherranz-santex/8323920.js"></script><br />
<br />
TA DA!<br />
<br />Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0Córdoba, Córdoba Province, Argentina-31.3989296 -64.182128900000009-31.6157841 -64.5048524 -31.1820751 -63.859405400000007tag:blogger.com,1999:blog-513001369933215986.post-42865652714697932302013-11-27T13:36:00.000-03:002013-11-27T13:36:28.326-03:00How to setup you repo GIT and local instance (like for GitLab) and not to fall in despair<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 28px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How to setup you repo GIT and local instance (like for GitLab) and not to fall in despair</span></div>
<b id="docs-internal-guid-35e5a4c3-9a6a-85c7-ecbc-137444e4fe5c" style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For a while now, while collaborating with several projects, I noticed that having issues to generated and setup the public keys and configuring the access to GIT repositories was giving a bit of a harsh time to lots of people.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">And when in comes to recurring problems there’s nothing better suited than a little reference tutorial to blaze the trail. So, let’s get to it!</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<h1 dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">#1: generate your SSH key-pair and set it up</span></h1>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<h2 dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Step #1: Check if you don’t already have a key pair</span></h2>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Open a terminal and run the following command:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="296"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1<br class="kix-line-break" />2<br class="kix-line-break" />3</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #aa22ff; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">cd</span><span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> ~/.ssh<br class="kix-line-break" />ls</span><span style="background-color: transparent; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Lists the files in your .ssh directory</span><span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Check the directory listing to see if you have a file named either </span><span style="background-color: white; color: #666666; font-family: 'Courier New'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">id_rsa.pub</span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> or </span><span style="background-color: white; color: #666666; font-family: 'Courier New'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">id_dsa.pub</span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. If you don't have either of those files go to </span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">step 2</span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Otherwise, you already have an existing keypair, and you can skip to </span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">step 3</span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Step #2: Generate new SSH keys</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To generate a new SSH key, enter the code below in the terminal. We want the default settings so when asked to enter a file in which to save the key, just press enter.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="555"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1<br class="kix-line-break" />2<br class="kix-line-break" />3<br class="kix-line-break" />4</span><span style="background-color: #eeeeee; color: #444444; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: darkgoldenrod; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">$ </span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">ssh-keygen -t rsa -C </span><span style="background-color: white; color: #bb4444; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"your_email@example.com"</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Creates a new ssh key, using the provided email as a label</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Generating public/private rsa key pair.</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" />ssh-add id_rsa</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now you need to enter a passphrase.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="457"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1<br class="kix-line-break" />2</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Enter passphrase </span><span style="background-color: white; color: #666666; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">empty </span><span style="background-color: white; color: #aa22ff; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for </span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">no passphrase): </span><span style="background-color: white; color: #666666; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Type a passphrase]</span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Enter same passphrase again: [Type passphrase again]</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Which should give you something like this:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="520"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1<br class="kix-line-break" />2<br class="kix-line-break" />3<br class="kix-line-break" />4</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Your identification has been saved in /Users/you/.ssh/id_rsa.</span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Your public key has been saved in /Users/you/.ssh/id_rsa.pub.</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># The key fingerprint is:</span><span style="background-color: white; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br class="kix-line-break" /></span><span style="background-color: white; color: #008800; font-family: 'Courier New'; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Step #3: Add your SSH key to GitLab</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Go to your account settings:</span><img height="380px;" src="https://lh5.googleusercontent.com/HrG50HwBYtN9HAo5Q3dvvLiDpbbimQIs1uw-oxbrdMg7ym4Nowd6JXGm7ixf-8jF5YE20YaPx1zDuw9YmrYwahFf9qMeLaYHU_RcQyX13i7_D3tO4jLCN6FsQA" width="624px;" /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</li>
</ol>
<ol start="2" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now go to the SSH keys section:</span><img height="59px;" src="https://lh3.googleusercontent.com/3J3il9uoV5C20KFtaVnlveeLWkyuAFSSsQreFjbB6oYouyGHVdIeJdlHWQPzhGdXWUVq7UhwWSqUP2PZhFnjt21brjT5nogbE_TO-CpdFTRjNfB-fXg06Jdb0g" width="624px;" /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<ol start="3" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Click “Add SSH key”</span><img height="132px;" src="https://lh3.googleusercontent.com/5ocYnkO2WK29tzf_95hcdCf1BSY3RtUiCb0_4zLFtONRhHoT-vSRI2ZW9cIigI2GeRqLdtGJk-yylZxbqX4inAi1401yU0OdNR-xVnzffDxhKe3W17OtK55LNA" width="624px;" /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</li>
</ol>
<ol start="4" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Give it a title you like (in the “Title” field) and paste your public key in the bigger “Key” field:</span><img height="380px;" src="https://lh4.googleusercontent.com/-SUZynVczt_J6T6ihM6BGdmy_68CIHfnrKWc6LYi8oA9Fym4fTsUFRhb1ANI-wTRO8Ph_iDxiGbANsEhm7212TWr_04Fbcfsrp91Bg5JC8t0R1FMIbh9UnAy8g" width="624px;" /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</li>
</ol>
<ol start="5" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Click “Add key” and we are done with loading the SSH public key in GitLab!</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Step #4: Check everything worked</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now we should have the key pair generated and set up locally and the public key loaded in GitLab. Let’s now make sure this is the case and that everything went fine.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To achieve such a certainty, run the following command:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="240"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: darkgoldenrod; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">$ </span><span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">ssh -T git@git.santexgroup.com</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If everything went well, you should see an output like this:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="17"></col><col width="261"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="background-color: #eeeeee; border: 0px solid #000000; padding: 0px 5px 0px 5px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #eeeeee; color: #999999; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1<br class="kix-line-break" />2</span></div>
</td><td style="border: 0px solid #000000; padding: 0px 8px 0px 8px; vertical-align: top;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: darkgoldenrod; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">$ </span><span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">ssh -T git@git.santexgroup.com<br class="kix-line-break" />Welcome to GitLab, <your username="">!</your></span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 21px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">#2: Some extra hints</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now we have the keys and our GitLab repo set up and ready to work. Now you should be able to clone, push/pull and do all sorts of thing with your GIT repos without being prompted for your username and password. </span><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If GIT, after making a command, asks you for your username or password, it means something at some point went wrong.</span><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Go back and make sure you didn’t miss any steps or ask someone for help.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Done with this and want to learn some new tricks? Take a look at this </span><a href="http://scoobygalletas.blogspot.com.ar/search/label/git" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">link</span></a><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">!</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Trebuchet MS'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<span style="font-family: 'Trebuchet MS'; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Hope this saves you of annoyances and frustrations in the future!</span>Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-59324538123270145242013-11-14T18:07:00.000-03:002013-11-14T18:07:00.194-03:00Python Violations Tool: Check<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
Si bien seguramente cada uno ya tiene sus herramientas para chequear violaciones en código Python, esta puede ser de utilidad, <b style="color: #1155cc;"><a href="https://github.com/jbalogh/check" style="color: #1155cc;" target="_blank">check</a></b>.</div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
<div>
Correr pep8 y pyflakes en tódos los archivos que queramos:<br /><pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px; white-space: pre-wrap;"><code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; padding: 0px; word-wrap: normal;"><span class="il" style="background-color: #ffffcc; background-position: initial initial; background-repeat: initial initial; color: #222222;">check</span>.py models.py tests/</code></pre>
</div>
<div>
Lo que tiene de novedoso/útil, es que sirve para verificar los errores introducidos sólo por nosotros basándose en el VCS, sin tener en cuenta las violaciones ya existentes en el código.</div>
<div>
<br /></div>
<div>
Para GIT, se puede agregar un pre-commit hook, para que aborte un commit si introdujimos errores: <a href="https://github.com/jbalogh/check#use-as-a-git-pre-commit-hook" style="color: #1155cc;" target="_blank">use-as-a-git-pre-<wbr></wbr>commit-hook</a></div>
<div>
<br /></div>
<div>
<b>Ejemplo</b></div>
<div>
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px; white-space: pre-wrap;"><code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; line-height: 19px; margin: 0px; padding: 0px; word-wrap: normal;"><span style="color: #333333; font-family: Consolas, Liberation Mono, Courier, monospace;">$ git commit -a -m"Test"
test_module.py:2: redefinition of unused 'logging' from line 1
</span><span style="background-color: transparent; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace;">test_</span><span style="color: #333333; font-family: Consolas, Liberation Mono, Courier, monospace;">module.py:42:1: E303 too many blank lines (22)
</span><span style="background-color: transparent; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace;">test_</span><span style="color: #333333; font-family: Consolas, Liberation Mono, Courier, monospace;">module.py:487:1: W391 blank line at end of file
Aborting commit. Fix above errors or do 'git commit --no-verify'.</span></code></pre>
</div>
<div>
<br /></div>
<div>
<b>Instalación</b></div>
<div>
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px; white-space: pre-wrap;"><code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; line-height: 19px; margin: 0px; padding: 0px; word-wrap: normal;"><div style="background-color: white; font-family: arial; line-height: normal; white-space: normal;">
$ pip install <a href="https://github.com/jbalogh/check/zipball/master" style="color: #1155cc;" target="_blank">https://github.com/jbalogh/<wbr></wbr><span class="il" style="background-color: #ffffcc; background-position: initial initial; background-repeat: initial initial; color: #222222;">check</span>/zipball/master</a></div>
<div style="background-color: white; font-family: arial; line-height: normal; white-space: normal;">
</div>
<div style="background-color: white; font-family: arial; line-height: normal; white-space: normal;">
# Después de crear el archivo pre-commit:</div>
<div style="background-color: white; font-family: arial; line-height: normal; white-space: normal;">
$ chmod 0755 .git/hooks/pre-commit</div>
</code></pre>
</div>
<div>
<br /></div>
<div>
Saludos!</div>
</div>
Anonymoushttp://www.blogger.com/profile/04095071354041120165noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-53543802142116017072013-11-06T11:05:00.001-03:002013-11-06T11:06:36.727-03:00Marcus Miller - Estival Jazz Lugano 2008<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/1Tp5YDdevbI" width="560"></iframe>Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-57552962827862548672013-11-05T14:08:00.000-03:002013-11-05T14:08:07.635-03:00List merge conflicts with GIT<br />
Made a merge, particularly, a big one and you want to know which where the files that had conflicts?<br />
<br />
Then, this command might come handy:<br />
<br />
<script src="https://gist.github.com/matiasherranz/7322393.js"></script><br />
<br />
You can also make a GIT alias this way:<br />
<br />
<script src="https://gist.github.com/matiasherranz/7322372.js"></script><br />
<br />
and then use it like this:<br />
<br />
<script src="https://gist.github.com/matiasherranz/7322406.js"></script>Matíashttp://www.blogger.com/profile/17142671153588083959noreply@blogger.com0tag:blogger.com,1999:blog-513001369933215986.post-68964024795839053812013-10-04T17:34:00.002-03:002013-10-04T18:13:59.685-03:00Ding! "El comando está listo"<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Buenas!</span><br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
A pedido de Mati les comparto algo simple pero tal vez útil!<br />
<br />
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
Cansado de fijarme a cada rato si un comando que tarda mucho terminó o no, hice una función "beep" en sh:<br />
<br />
<b>$ beep</b><span class="Apple-converted-space"> </span> # Reproduce sonido de "éxito"</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<b>$ beep command arg1 arg2 ...</b><span class="Apple-converted-space"> </span># Reproduce sonido de éxito si<span class="Apple-converted-space"> </span><b>command</b> termina con éxito, sino sonido de fallo</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
Para usarlo tienen que poner este código en "./bashrc" o "./bash_profile", y la próxima vez que abran una consola lo van a tener disponible.</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
Obiamente pueden cambiar los sonidos que se ejecutan en cada caso a gusto, el primero es el de éxito y el segundo el de fallo.</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br />
Faltaría mejorarlo para que tome una sequencia de comandos. </div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<b>UBUNTU</b><br />
<b><br /></b></div>
<script src="https://gist.github.com/matiasherranz/6832420.js"></script><br />
<pre class="line-pre" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin: 0px; orphans: auto; padding: 0px; text-align: start; text-indent: 0px; text-transform: none; widows: auto; width: 819px; word-spacing: 0px;"></pre>
<div style="background-color: white; orphans: auto; text-align: start; text-indent: 0px; widows: auto;">
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<br />
<b>MAC</b></div>
<div style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br />
<pre class="line-pre" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin: 0px; orphans: auto; padding: 0px; text-align: start; text-indent: 0px; text-transform: none; widows: auto; width: 744px; word-spacing: 0px;"></pre>
</div>
<span style="color: #222222; font-family: monospace;"><span style="font-size: 13px;"><script src="https://gist.github.com/matiasherranz/6832433.js"></script></span></span></div>
<br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
Saludos!</div>
Anonymoushttp://www.blogger.com/profile/04095071354041120165noreply@blogger.com2