Skip to content

Instantly share code, notes, and snippets.

View miguelbaldi's full-sized avatar

Miguel Aranha Baldi Horlle miguelbaldi

View GitHub Profile

Keybase proof

I hereby claim:

  • I am miguelbaldi on github.
  • I am miguelbaldi (https://keybase.io/miguelbaldi) on keybase.
  • I have a public key ASBGoDaYwrHKBILbtwkv-1VlnIokWn8u7QYURC2F8n9Xygo

To claim this, I am signing this object:

@miguelbaldi
miguelbaldi / debian-backup
Created July 4, 2014 21:46
Backup/restore script for debian packages
#!/bin/bash
# ---------------------------------------------------------------------------
# debian-backup - Tool for backup/restore debian packages
# Copyright 2013, Miguel A. Baldi Horlle ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@miguelbaldi
miguelbaldi / install-oracle-jdk.sh
Last active December 25, 2015 20:39
Bash script for installing Oracle JDK|JRE as a Debian Package and optionally configuring java plugin for Mozilla browser. Just follow the instructions: ./install-oracle-jdk.sh Needs sudo installed and configured. Tested on Debian Jessie (testing)
#!/bin/bash
# ---------------------------------------------------------------------------
# install-oracle-jdk.sh - Oracle Java JDK/JRE Debian installer
# Copyright 2013, Miguel A. Baldi Horlle ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@miguelbaldi
miguelbaldi / gist:3098239
Created July 12, 2012 13:56
JUnit rule for expected exception
public class TripServiceTest {
private static final User UNUSED_USER = null;
private static final User NON_LOGGED_USER = null;
private User loggedUser = new User();
private User targetUser = new User();
private TripService tripService;
@Rule
public ExpectedException exception = ExpectedException.none();
@miguelbaldi
miguelbaldi / gedit-js-beautifier
Created April 23, 2011 03:55
Configuration tool for formatting javascript within gEdit (using 'External Tools' gEdit plugin)
#!/usr/bin/env python
import os
import sys
import tempfile
jsbeautifier_home = "/home/miguel/dev/javascript/js-beautify/"
content = sys.stdin.read()
h, tmpfile = tempfile.mkstemp()
~/projects ➔ gem install java-inline
Successfully installed ZenTest-4.1.4
Successfully installed RubyInline-3.8.3
Successfully installed java-inline-0.0.1-java
3 gems installed
Installing ri documentation for ZenTest-4.1.4...
Installing ri documentation for RubyInline-3.8.3...
Installing ri documentation for java-inline-0.0.1-java...
Installing RDoc documentation for ZenTest-4.1.4...
Installing RDoc documentation for RubyInline-3.8.3...