Skip to content

Instantly share code, notes, and snippets.

View madlymad's full-sized avatar
Coding stuff

Mando Stamelaki madlymad

Coding stuff
View GitHub Profile
madlymad / BaseTest.kt
Last active March 24, 2021 14:33
RoomDB testing
abstract class BaseTest {
var coroutinesTestRule = CoroutinesTestRule()
var instantTaskExecutorRule = InstantTaskExecutorRule()
lateinit var application: Application
madlymad /
Last active October 7, 2020 18:24
MacOS script for loading system proxy setting at bash and git
proxyToFile() {
local filename="$2"
# break if filename not found
if [[ ! -f $filename ]]; then return -1; fi
local add="$1"
if [[ "$add" = "true" ]]; then
perl -pi -e 's/^#http/http/' $filename
madlymad / ipa-uploader
Created March 22, 2019 12:36 — forked from beny/ipa-uploader
validate and check ipa to iTunes Connect
# origin
altool="$(dirname "$(xcode-select -p)")/Applications/Application"
echo "Validating app..."
time "$altool" --validate-app --file "$1" --username "$appleId" --password @keychain:"Application Loader: $appleId"
echo "Uploading app to iTC..."
time "$altool" --upload-app --file "$1" --username "$appleId" --password @keychain:"Application Loader: $appleId"
package com.alexzh.recyclerviewsetemptyview;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
public class EmptyRecyclerView extends RecyclerView {
private View mEmptyView;
madlymad / CNTLM Proxy - Centos
Created September 26, 2018 07:23 — forked from lpf23/CNTLM Proxy - Centos
Configure CNTLM Proxy on Centos/Ubuntu
1) Download cntlm rpm package from
2) Login as root
3) Run command:
$ rpm -ivh cntlm-*.rpm
4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration)
$ cntlm -H -d <domain> -u <username>
madlymad / AndroidManifest.xml
Last active March 20, 2018 12:39 — forked from alexsinger/build.gradle
Separate Crashlytics reporting for debug and release buildTypes using a Gradle build
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<!-- Your code here-->
android:value="${crashlyticsApiKey}" />
madlymad /
Last active November 3, 2017 12:25 — forked from cpthooch/
Routing all traffic to particular IP address via wifi network interface on MacOS
# NOTE: wifi/ethernet network interface is: en1
mac_network_interface=ifconfig $net_interface ether | sed -nl 's/\w*ether \([^ ]*\).*/\1/p' | sed 's/:/./g'
wifi_router=netstat -nr | grep default | grep $net_interface | perl -nle '/(\d+\.\d+\.\d+\.\d+)/ && print $1'
TOADDR=`ifconfig $net_interface inet | sed -nl 's/\w*inet \([^ ]*\).*/\1/p'`
TO=`echo -n ${TOADDR//[[:space:]]}`
madlymad /
Created March 25, 2017 23:30
download swf pages of a book and convert to png files
# Add the number of pages
rm -rf *.swf*
mkdir SWF
mkdir PNG