Skip to content

Instantly share code, notes, and snippets.

@evelyne24
evelyne24 / 0_reuse_code.js
Last active August 29, 2015 14:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@evelyne24
evelyne24 / L.java
Created September 28, 2013 18:20
Because cats are AWESOME and because programming is AWESOME! Being inspired by the beautiful Cat ASCII Art here https://user.xmission.com/~emailbox/ascii_cats.htm I decided to make LogCat behave like its name! This makes my debugging so much fun! :D
package org.codeandmagic.android.wink;
import android.util.Log;
import java.text.MessageFormat;
import static java.lang.String.format;
/**
* Created by evelyne24.
*/
@evelyne24
evelyne24 / TestSubjects.java
Last active July 12, 2016 08:22
`test` *bold*
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
@evelyne24
evelyne24 / README
Last active November 24, 2017 21:36
I've been using Maven for Android projects quite extensively from command line lately and I found that a colour output is really helpful.I'm using iTerm2 on MacOs Mavericks (10.9). I've found a couple of bash scripts to colorise Maven output but none was quite enough for me :PThe two best I found are https://gist.github.com/mike-ensor/1881211 and
The blog post explainig how to use this: http://android.codeandmagic.org/colorize-maven-output/
source $HOME/.mvn_colour.sh
@evelyne24
evelyne24 / .dockerignore
Last active September 4, 2019 19:57
Docker-ize Connfa
Dockerfile
.git
.git*
@evelyne24
evelyne24 / CustomTextView.java
Last active May 8, 2021 15:40
This is how to get the colour from a custom style within a custom style within an Android Theme.
package org.codeandmagic.android.customtheme;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.widget.TextView;
@evelyne24
evelyne24 / scrollable_footer.dart
Created April 7, 2019 21:06
Flutter scrollable footer - a footer that stays at the bottom of the screen and scrolls with its container; also see https://docs.flutter.dev/flutter/widgets/SingleChildScrollView-class.html
@evelyne24
evelyne24 / pre-build.sh
Last active December 18, 2022 05:56
Bash script to extract the build name and number from `pubspec.yaml` before building your Flutter app
#!/bin/bash
set -e
file=$(cat pubspec.yaml)
BUILD_NAME=$(echo $file | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')
BUILD_NUMBER=$(git rev-list HEAD --count)