Skip to content

Instantly share code, notes, and snippets.

Luis Miranda luuuis

Block or report user

Report or block luuuis

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
@luuuis
luuuis / pre-commit.sh
Last active May 15, 2019 — forked from dahjelle/pre-commit.sh
Pre-commit hook for eslint, linting *only* staged changes.
View pre-commit.sh
#!/usr/bin/env bash
set -uo pipefail
IFS=$'\n\t'
#
# Improvements from dahjelle/pre-commit.sh:
# - does not lint deleted files,
# - lints all staged files before exiting with an error code,
# - handles spaces and other unusual chars in file names.
#
View CommentBuilder.java
package com.atlassian.crowd.plugin.usermanagement.rest.controller;
import com.atlassian.fugue.Option;
import static com.atlassian.crowd.plugin.usermanagement.rest.controller.Visibility.Internal;
import static com.atlassian.fugue.Option.some;
class Main {
public static void main(String[] args) {
CreateComment comment1 = CreateComment.build(
@luuuis
luuuis / pom_get_version.py
Created Aug 16, 2013
Pull a project's <version> out of the pom.xml in Python
View pom_get_version.py
#!/usr/bin/env python2.7
import argparse
import sys
from xml.etree import ElementTree
def get_pom_version(full_path):
"""Returns the version of a pom.xml file."""
et = ElementTree.parse(full_path)
props = et.findall('./{http://maven.apache.org/POM/4.0.0}version')
@luuuis
luuuis / jfunc
Created Nov 20, 2012
Shell script to use with git-bisect for JIRA func tests
View jfunc
#!/usr/bin/env bash
if [ \! $# -eq 1 ]; then
echo "usage: `basename $0` <NameOfTestClass>"
exit 1;
fi
TEST=$1
# find the fully qualified name
PREFIX=jira-func-tests/src/main/java/
View stats.sh
#!/bin/bash
DIR=$1
if [ -z "$DIR" ]; then
echo "$0 <dir>" 2>&1
exit -1
fi
echo "Instances:\t\t\t `ls -1 $DIR | wc -l`"
echo "CFs w/ <script>:\t\t `grep '<script' -r . | wc -l`"
echo "Instances w/ <script>:\t\t `grep -c '<script' -r .| grep -v :0 | wc -l`"
@luuuis
luuuis / applinks-move.py
Created Feb 20, 2012
Moves all application links from one application to another.
View applinks-move.py
@luuuis
luuuis / git-shallow-clone.sh
Created Oct 18, 2011
shallow clone of a single Git branch
View git-shallow-clone.sh
#!/bin/sh
if [ $# -lt 2 ]; then
echo "usage: $0 <repo> <dir> [branch]"
exit 1
fi
REPO=$1
DIR=$2
BRANCH="$3"
You can’t perform that action at this time.