Skip to content

Instantly share code, notes, and snippets.

View smola's full-sized avatar

Santiago M. Mola smola

View GitHub Profile
public class MyUsernamePasswordAuthProvider
extends /* ........ */ {
/* ... MORE ... */
/**
* XXX: Ugly hack for Remember Me feature.
*/
public static Result handleLogin(final Context ctx, final boolean rememberMe) {
final Result result = UsernamePasswordAuthProvider.handleLogin(ctx);
@smola
smola / TPB.AFK.2013.720p.h264-SimonKlose.srt
Last active December 13, 2015 22:59 — forked from tpbafk/TPB AFK subtítulos en español
Spanish subtitles for TPB AFK. Original from: http://www.opensubtitles.org/es/subtitles/4803312/tpb-afk-the-pirate-bay-away-from-keyboard-es Encoding converted to UTF-8, Spain localization of monetary amounts, vocabulary adaptations for Spain.
1
00:00:01,000 --> 00:00:04,074
_
2
00:00:14,162 --> 00:00:20,796
En los primeros años del siglo 21,
The Pirate Bay creció para convertirse en el sitio
más grande de intercambio de ficheros.
@smola
smola / poswap.py
Created September 17, 2013 21:18
A Python script for swaping source and target language on a Gettext PO file.
#!/usr/bin/env python
# poswap.py
#
# Copyright (C) 2013 Santiago M. Mola
# Released under the terms of the MIT License.
#
"""
Swaps the source and target language in a Gettext PO file.
Learn more at http://mola.io/2013/09/17/swapping-languages-in-gettext-po-file
@smola
smola / star_all_the_repos.py
Last active May 5, 2017 07:13
STAR ALL THE REPOS!
#!/usr/bin/python
#
# Stars all the repos for an organization.
#
import sys
import urllib2
import json
import os.path
@smola
smola / jira_adjust_time_tracking.py
Created May 24, 2016 15:07
jira_adjust_time_tracking.py
#!/usr/bin/env python
# coding: utf-8
"""
Adjusts the time tracking for issues in a given JIRA project.
Requires 'jira' library:
$ pip install jira
JIRA credentials need to be stored in a file '.jira_auth.json'.
Its contents should be:
@smola
smola / git-find-roots
Created January 18, 2017 09:23
Find all initial commits and the commits where they were merged
#!/bin/bash
#
# git-find-roots finds every commit with no parent (initial commits)
# and the commit where they were merged.
#
# Usage:
# git-find-roots [commit-ish]
#
# Example:
# git-find-roots master
@smola
smola / setup_winrm_with_vboxmanage.rb
Last active June 5, 2017 16:04
Enable WinRM on Windows 10 VM on VirtualBox
# Copyright © 2017 Santiago M. Mola
# Licensed under the terms of the MIT License.
#
# This script is a proof-of-concept to enable WinRM
# on Windows 10 (vagrant box Microsoft/EdgeOnWindows10).
#
# It borrows from the instructions by André Albino Pereira
# at https://gist.github.com/andreptb/57e388df5e881937e62a
#
# This is not considered stable and, in fact, I'm moving
@smola
smola / k8s-jprofiler-attach.sh
Created March 23, 2018 14:49
Attach JProfiler agent to a JVM running in a Kubernetes pod
#!/bin/bash
set -e
if [[ -z ${K8S_JVM_POD} ]]; then
echo "K8S_JVM_POD not defined"
exit 1
fi
EXEC="kubectl exec ${K8S_JVM_POD}"
CP="kubectl cp ${K8S_JVM_POD}"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smola
smola / gitbase_reference.ipynb
Last active May 29, 2018 15:16
Gitbase reference (DRAFT)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.