Skip to content

Instantly share code, notes, and snippets.

View dron247's full-sized avatar

dron247 dron247

View GitHub Profile
@dron247
dron247 / git-change-commit-messages.md
Created May 28, 2018 04:25 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@dron247
dron247 / gist:5dc35a61e9310afd4b2f69a48d26aa33
Created January 29, 2018 13:46 — forked from jacobmoncur/gist:8587185
Gradle file for getting maven dependencies hosted on private github repo
repositories {
mavenCentral()
maven {
url = 'https://github.com/github-username/github-project/raw/master'
credentials {
username 'my-username'
password 'my-password'
}
}
}
@dron247
dron247 / git-tag-delete-local-and-remote.sh
Created June 20, 2017 15:50 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
public static DateTime GetLinkerTime(this Assembly assembly, TimeZoneInfo target = null)
{
var filePath = assembly.Location;
const int c_PeHeaderOffset = 60;
const int c_LinkerTimestampOffset = 8;
var buffer = new byte[2048];
using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
stream.Read(buffer, 0, 2048);