Skip to content

Instantly share code, notes, and snippets.

View kikoso's full-sized avatar
💭
Learning things.

Enrique López Mañas kikoso

💭
Learning things.
View GitHub Profile
parse_firebase_branch() {
cat .firebaserc 2>/dev/null | grep default | sed 's/^.\{16\}//' | sed 's/.$//'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_firebase_branch)\[\033[00m\] $ "
;WITH USER_BY_TAG
AS
(
SELECT
ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) Rank,
u.Location,
COUNT(*) AS UpVotes
FROM Tags t
INNER JOIN PostTags pt ON pt.TagId = t.id
#!/bin/sh
read -p "Have the feature been tested? (y/N):" answer
if [[ "$answer" != "y" ]]; then
exit 1
fi
read -p "Have you updated your Jira? (y/N):" answer
if [[ "$answer" != "y" ]]; then
exit 1
fi
read -p "Have you created a test version? (y/N):" answer
#!/bin/sh
name_of_branch=$(git branch | grep "*" | sed "s/\* //")
if [[ $name_of_branch == "master" ]]; then
read -p "Branch successfully merged on master. Please, specify tag version and click enter: " version
echo Creating tag with version "$version"
git tag -a v$version -m "$version"
fi
#!/bin/sh
echo "Running detekt"
./gradlew detektCheck
result=$?
if [ "$result" = 0 ] ; then
echo "Detekt found no problems"
exit 0
else
#!/bin/sh
echo "Running detekt"
./gradlew detektCheck
result=$?
if [ "$result" = 0 ] ; then
echo "Detekt found no problems"
exit 0
else
#!/bin/bash
command="./gradlew clean test"
echo "Executing tests before commit"
$command
result=$?
if [ "$result" -ne 0 ]; then
echo "Failed execution of tests"
exit 1
fi
exit 0
byte[] keyStart = getSecretKey().getBytes();
Java_com_example_exampleApp_ExampleClass_getSecretKey( JNIEnv* env,
jobject thiz )
{
return (*env)->NewStringUTF(env, "mySecretKey".");
}
static {
System.loadLibrary("library-name");
}
public native String getSecretKey();