Skip to content

Instantly share code, notes, and snippets.

View cjurjiu's full-sized avatar
🕸️

Catalin Jurjiu cjurjiu

🕸️
View GitHub Profile
@cjurjiu
cjurjiu / regexps.js
Created July 9, 2022 06:30
Saved regexp's
//Find a color definition within html, svg, etc. (e.g. "#31bfa1", "#420")
const = /#(?:[0-9a-fA-F]{3}){1,2}/g
@cjurjiu
cjurjiu / changeHistory.sh
Created August 29, 2021 15:21
Change the git author for the whole history (of current branch)
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="bomber.boi@gmail.com"
CORRECT_NAME="Corporate Dude"
CORRECT_EMAIL="corporate.dude@users.noreply.github.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@cjurjiu
cjurjiu / gist:2cd91e2a08d59ad9c3bf13cd6eb7ff1b
Created May 31, 2019 11:42
Show dependencies for given gradle module & configuration
./gradlew -q dependencies <module>:dependencies --configuration <configuration>
@cjurjiu
cjurjiu / git-change-author.sh
Last active July 28, 2018 19:26
Change git author
#!/usr/bin/env bash
# Changes the git author string of commits commited by author defined at <from> to the
# string defined at <to>.
#
# Make sure to edit the initial & desired authors to fit your needs, before running.
#
# <from> <to>
git change-commits GIT_AUTHOR_EMAIL "user@domain.com" "cjurjiu@users.noreply.github.com"
@cjurjiu
cjurjiu / publishMavenLocal.gradle
Last active March 30, 2018 13:42 — forked from Robyer/maven-publish-helper-usage.gradle
Gradle script for publishing Android library to local Maven repository using maven-publish plugin. With dependencies (also handling transitive: false and custom exclude rules), including sources and javadoc.
apply plugin: 'maven-publish'
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
if (variant.name == 'release') {
owner.classpath += variant.javaCompile.classpath
}
}