This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ] | |
then | |
echo "Usage: ./resize.sh input.png" | |
else | |
convert $1 -resize 40% resize-output.png | |
display resize-output.png | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ] || [ -z $3 ] | |
then | |
echo "Usage: ./collage3.sh image1.png image2.png image3.png" | |
else | |
convert $1 -resize 40% resize1.png | |
convert $2 -resize 40% resize2.png | |
convert $3 -resize 40% resize3.png | |
convert resize1.png resize2.png resize3.png +append collage.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch | grep -v "master" | xargs git branch -D | |
alias clearbranches='git branch | grep -v "master" | xargs git branch -D' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dell XPS 13 | |
while sleep 0.1; do pacmd set-source-volume alsa_input.pci-0000_00_1f.3.analog-stereo 16000; done | |
# HP Pavilion Laptop (jordihurtado) | |
while sleep 0.1; do pacmd set-source-volume alsa_input.pci-0000_00_1b.0.analog-stereo 18000; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task createTestResources { | |
description = "Allows Mocking non-final classes and data classes in a Kotlin project" | |
doLast { | |
def mockMakerFile = new File("$projectDir/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker") | |
if (System.env.MOCK_MAKER != null) { | |
logger.info("Using MockMaker ${System.env.MOCK_MAKER}") | |
mockMakerFile.parentFile.mkdirs() | |
mockMakerFile.createNewFile() | |
mockMakerFile.write(System.env.MOCK_MAKER) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when(mockContext.getString(eq(R.string.string_with_param), any(String.class))).thenReturn("Return value"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2018 Olmo Gallegos Hernández. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.pdf.PdfRenderer; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import es.voghdev.pdfviewpager.library.R; | |
@SuppressWarnings("NewApi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity | |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.pdf.PdfRenderer | |
import android.support.v4.view.ViewPager | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import com.davemorrissey.labs.subscaleview.ImageSource | |
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2018 Olmo Gallegos Hernández. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
NewerOlder