Skip to content

Instantly share code, notes, and snippets.

To make jd-gui run on Ubuntu, install these packages:
sudo apt-get install libgtk2.0-0:i386 libxxf86vm1:i386 libsm6:i386 lib32stdc++6
@arlago
arlago / gist:5fe1423619db2c393696
Created May 25, 2015 01:11
To configure java plugin o Firefox on Ubuntu
1°. mkdir ~/.mozila/plugins
2°. ln -s <jre_path>/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
@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/"
@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: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: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: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 / 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 / python-debug.md
Last active February 28, 2017 20:19
Python debug with pdb
@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