Skip to content

Instantly share code, notes, and snippets.

View danielgomezrico's full-sized avatar

Daniel Gomez danielgomezrico

View GitHub Profile
@danielgomezrico
danielgomezrico / markdown-details-collapsible.md
Created August 12, 2021 16:12 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@danielgomezrico
danielgomezrico / phoronix-cmd.md
Created November 27, 2018 16:11 — forked from anshula/phoronix-cmd.md
Phoronix Test Suite Cheat Sheet
@danielgomezrico
danielgomezrico / rbenv-install-system-wide.sh
Last active February 5, 2018 18:38 — forked from tomazzlender/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu to /opt/rbenv
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/rbenv/rbenv.git /opt/rbenv
# Add rbenv to the path:
@danielgomezrico
danielgomezrico / add local aar file.md
Created January 21, 2017 17:09 — forked from shau-lok/add local aar file.md
Android Studio add local .aar reference

Add local .aar file

  1. basic build.gradle directory using flatDir
repositories {
    mavenCentral()
    flatDir {
 dirs 'libs'
@danielgomezrico
danielgomezrico / make-git-use-sublime.markdown
Created October 25, 2016 19:36 — forked from geekmanager/make-git-use-sublime.markdown
Making git use Sublime Text for rebase etc

Making git use Sublime Text

First up, let's make Sublime Text 2 available from the command line in terminal, by creating a link to subl which is the launcher from terminal:

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

(added bonus of this approach is when you upgrade to ST3 or change text editor, you can just redirect the symlink).

If there's any chance that bash doesn't check usr/local/bin then use [Launch Sublime Text 2 from Mac OSX Terminal] for more detailed instructions on how to make this happen.

@danielgomezrico
danielgomezrico / completion-for-gradle.md
Created July 26, 2016 18:21 — forked from nolanlawson/completion-for-gradle.md
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
@danielgomezrico
danielgomezrico / demo.sh
Created July 4, 2016 11:43 — forked from rock3r/README.md
A simple bash script to enable demo mode on a Marshmallow+ device via ADB (based on http://bit.ly/295BHLx)
#!/bin/sh
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
#
# Based on http://bit.ly/295BHLx
@danielgomezrico
danielgomezrico / AlphaTransformation.java
Last active June 6, 2016 16:38 — forked from r0adkll/ShadeTransform.java
Android - alpha/shadow transformation for Picasso (This allows you to draw a transparent black shade over the source image)
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
public class AlphaTransformation implements Transformation {
/* The shade alpha of black to apply */
@danielgomezrico
danielgomezrico / git-author-rewrite.sh
Last active April 4, 2019 11:02 — forked from octocat/git-author-rewrite.sh
Git - Replace all author name/email with same old_email (by branch)
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@danielgomezrico
danielgomezrico / pre-commit.sh
Last active February 12, 2016 04:22 — forked from chadmaughan/pre-commit.sh
A git pre commit hook that runs the test task with the gradle wrapper
#!/usr/bin/env bash
# this hook is in SCM so that it can be shared
# to install it, create a symbolic link in the projects .git/hooks folder
#
# i.e. - from the .git/hooks directory, run
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit
#
# to skip the tests, run with the --no-verify argument
# i.e. - $ 'git commit --no-verify'