Skip to content

Instantly share code, notes, and snippets.

Menny Even Danan menny

View GitHub Profile
@menny
menny / git.md
Last active Feb 12, 2019
git cheatsheet
View git.md

SpotiGit Cheat-Sheet

General

rebasing local branch from origin git pull --rebase if rebasing from a different remote branch git pull --rebase origin master

most of the time, after pull, you’ll need to update the submodules

@menny
menny / benchmark_git_status_pref.sh
Last active Jan 28, 2019
git status pref script
View benchmark_git_status_pref.sh
#!/bin/bash
command -v gtime >/dev/null 2>&1 || { echo >&2 "GNU time is required. Install it through 'brew install gnu-time'. Aborting."; exit 1; }
command -v rs-git-fsmonitor >/dev/null 2>&1 || { echo >&2 "rs-git-fsmonitor is required. Read https://github.com/jgavris/rs-git-fsmonitor#installation for how to install. Aborting."; exit 1; }
if [[ "${USER}" != "root" ]]; then
echo "Run this script as root, since we need to call dtruss during the script."
exit 1
fi
View .buckconfig.yaml
[buildfile]
includes = //DEFS
@menny
menny / .git-hooks-pre-push
Last active Aug 29, 2015
Get Reviewers using Git Blame
View .git-hooks-pre-push
#!/bin/sh
java -jar git-blame-reviewers-suggestions-1.0-SNAPSHOT-jar-with-dependencies.jar
@menny
menny / VersionBuilder.groovy
Last active Aug 29, 2015
VersionBuilder for Gradle
View VersionBuilder.groovy
package versionbuilder
class VersionBuilder {
static final int GIT_COMMIT_COUNT_NORMALIZE = 230;
static final int GIT_COMMIT_COUNT_MINOR_NORMALIZE = 0;
static def buildGitVersionNumber() {
return Integer.parseInt('git rev-list --count HEAD'.execute().text.trim()) - GIT_COMMIT_COUNT_NORMALIZE;
}
View CustomGradleTestRunner.java
public class CustomGradleTestRunner extends RobolectricGradleTestRunner {
private static final int MAX_SDK_LEVEL = 21;
public CustomGradleTestRunner(Class<?> klass) throws InitializationError {
super(klass);
}
@Override
public Config getConfig(Method method) {
Config config = super.getConfig(method);
@menny
menny / build.gradle
Last active Aug 29, 2015
Shippable for _Android_ Projects
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.9.+'
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am menny on github.
  • I am menny (https://keybase.io/menny) on keybase.
  • I have a public key whose fingerprint is F7D8 486B ADBE 811F 215C E8AF 9BB4 3017 E7B6 15D4

To claim this, I am signing this object:

@menny
menny / AndroidManifest_API3.xml
Created Dec 10, 2013
Gists for 2013-12-10-multi_API_level_release post
View AndroidManifest_API3.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.menny.android.anysoftkeyboard"
android:versionCode="112"
android:versionName="20131030">
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="3"
android:maxSdkVersion="3">
</uses-sdk>
View EdgeEffect_ctor.java
public EdgeEffect(Context context) {
final Resources res = context.getResources();
mEdge = res.getDrawable(R.drawable.overscroll_edge);
mGlow = res.getDrawable(R.drawable.overscroll_glow);
You can’t perform that action at this time.