Skip to content

Instantly share code, notes, and snippets.

View fobo66's full-sized avatar
🏠
Working from home

Andrei Mukamolau fobo66

🏠
Working from home
View GitHub Profile
@fobo66
fobo66 / android2iosstrings.awk
Created March 13, 2020 13:18
awk script to convert Android strings.xml into iOS Localizable.strings
BEGIN{
FS = "^ *<string *| *>|<\/string> *$|^ *<!-- *| *--> *$";
}
{
if (/<string.*name\=\".*\".*>.*<\/string> *$/){
match($2, /name *\= *\"[^ ]+\"/)
name = substr($2, RSTART + 5, RLENGTH - 5)
print name " \= \"" $3 "\";"
}
else if(/<!--.*-->/)
package io.github.fobo66.sqlite;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import android.util.Log;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
@fobo66
fobo66 / dirreduce.py
Last active June 15, 2019 14:01
Script for copying multiple files' contents into one file
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@fobo66
fobo66 / propertiesLoader.gradle
Last active October 21, 2017 15:35
Useful gist for loading Gradle properties from files
// Load properties from file in the way recommended by Android docs
//
// Usage:
// def keystoreProperties = loadProperties("keystore.properties")
// ...
// android {
// ...
// signingConfigs {
// releaseConfig {
// keyAlias keystoreProperties['keyAlias']