Skip to content

Instantly share code, notes, and snippets.

Iñaki Abete inakiabt

Block or report user

Report or block inakiabt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@inakiabt
inakiabt / 0_reuse_code.js
Created May 31, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@inakiabt
inakiabt / decode-email.rb
Created Jul 16, 2014
Decode raw text/plain email
View decode-email.rb
# gem install mail
require 'rubygems'
require 'mail'
mail = Mail.new(open("body.txt").read)
print mail.text_part.decode_body
View build.sbt
name := "DES and AES encryption in Scala"
version := "1.0"
scalaVersion := "2.9.1"
libraryDependencies += "commons-codec" % "commons-codec" % "1.6"
@inakiabt
inakiabt / echoHttpRequest.js
Last active Aug 29, 2015 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
View echoHttpRequest.js
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
View keybase.md

Keybase proof

I hereby claim:

  • I am inakiabt on github.
  • I am inakiabt (https://keybase.io/inakiabt) on keybase.
  • I have a public key whose fingerprint is 35D5 CC84 32AD 4E17 1BC3 A7FA 65C2 8E14 835D F963

To claim this, I am signing this object:

View gist:476b3c52af8a8c207c10
Verifying I am +inakiabt on my passcard. https://onename.com/inakiabt
View aws_usage.py
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
@inakiabt
inakiabt / MemcacheEx.php
Created Feb 16, 2011
MemcacheEx - Memcache extension to support setMulti and getMulti methods
View MemcacheEx.php
<?php
class MemcacheEx extends Memcache
{
public function getMulti($keys)
{
$results = array();
if ($keys) {
foreach ($keys as $key) {
$cache = parent::get($key);
if ($cache !== false) {
View SupervisedFileConumer.scala
// ###########################################################
//
// Demonstrates how to supervise an Akka consumer actor.
//
// The consumer consumes messages from a file endpoint:
// - successful message processing by the consumer will
// positively acknowledge the message receipt, causing
// the file endpoint to delete the file.
// - an exception during message processing will cause a
// supervisor to restart the consumer. Before restart,
View nxfetch.sh
#!/bin/bash
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging -r repository
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE=http://repository.example.com:8081/nexus
REST_PATH=/service/local
ART_REDIR=/artifact/maven/redirect
You can’t perform that action at this time.