Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am arlago on github.
  • I am lakedevgrid (https://keybase.io/lakedevgrid) on keybase.
  • I have a public key ASBLdpZ_VJzbyI09fzRvoU5hiM1m-o40ddAAKDvGBW1Ymwo

To claim this, I am signing this object:

@arlago
arlago / configure_queues.sh
Created June 14, 2017 19:45 — forked from fforbeck/configure_queues.sh
RabbitMQ - Command Line Setup. Create queue, bindings, exchanges with rabbitmqadmin and rabbitmqctl
#!/usr/bin/env bash
URL="http://localhost:15672/cli/rabbitmqadmin"
VHOST="<>"
USER="<>"
PWD="<>"
QUEUE="<>"
FAILED_QUEUE="<>"
@arlago
arlago / python-virtualenv.md
Created February 28, 2017 20:21
Python virtualenv how to

Install virtualenv

sudo apt-get install python-virtualenv

Create project virtualenv

virtualenv

Update existent virtualenv to Python 3

virtualenv -p python3

Activate virtualenv

@arlago
arlago / python-debug.md
Last active February 28, 2017 20:19
Python debug with pdb
@arlago
arlago / json_pretty_print.py
Last active February 28, 2017 20:15
Python terminal json pretty print
#!/usr/bin/env python
import json
import sys
import argparse
from collections import OrderedDict
parser = argparse.ArgumentParser(description='JSON pretty print')
parser.add_argument('-i', type=int, default=2, help='Number of spaces of identation.')
@arlago
arlago / gist:fc7320103d104b4691bb
Created July 17, 2015 03:22
Consume graph draft
http://jsfiddle.net/ym5w0gk5/6/
width = 200 ;
height = 200 ;
//svg
var svg = d3.select("body").append("svg").attr("id","vis")
.attr("width", width )
.attr("height", height );
@arlago
arlago / gist:02ab99687de4f6016b40
Last active August 29, 2015 14:25
Angular custom input filter
<!DOCTYPE html>
<html ng-app="asdf">
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script type="text/javascript">
angular.module('asdf', []).controller('fdsa', function($scope) {
}).filter('beginningWith', function() {
return function(array, query) {
@arlago
arlago / gist:632d5a977703c1bd3ba9
Created May 31, 2015 19:17
Use Vorlon.js to debug Ionic App.
-> Install Vorlon to start the server.
npm i -g vorlon
-> Add vorlon on Ionic App index page.
With sessionid if exists several apps in the same server
<script src="http://vorlon_server_host:1337/vorlon.js?SESSIONID"></script>
Uses default sessionid when one app per server.
<script src="http://vorlon_server_host:1337/vorlon.js"></script>
@arlago
arlago / gist:6a47ed04fad8316518f4
Created May 26, 2015 13:58
Node Application Debug
1. Global installation of node-inspector.
sudo npm install -g node-inspector
2. Start node application.
node --debug ./bin/www
3. Start node-inspector.
node-inspector
@arlago
arlago / gist:2cb43b68a91993edcb65
Created May 25, 2015 21:18
dex2jar automation
#!/bin/sh
if [ 1 != $# ]; then
echo "Usage:"
echo `basename $0` "<apk-full-file-name>"
exit 1
fi
APK_FULL_PATH=`readlink -nf $1`
DEXTOJAR_DIR="/home/rodrigo/Desenvolvimento/Android/dex2jar/dex2jar-2.0/"