Skip to content

Instantly share code, notes, and snippets.

Stash only unstagged lines

git stash -k

Merge two stashes

https://stackoverflow.com/a/14506564/1244574

  1. Pop our 1st commit
    • git stash pop
  2. Make a temp commit, will undo at step 4.
    • git add . && git commit -am 'WIP'
  3. Pop our 2nd commit
/**** #### Problem This Solves #### ****/
// Sometimes libraries added with "compile" will include their own dependencies.
// This can conflict with specific versions in your project or cause automatic upgrades
// overriding your specified versions as gradle resolves the highest value.
// A simpile workaround is to use the `force` flag on compile to override specific modules
// however this can be a pain to hunt down and define if there are multipile modules and groups.
/**** 1. How to use *****/
// 1.1 Place this your app's buidle.gradle and it will force override
// all Google Play services (GMS) and Android Support Libraries versions.
@jkasten2
jkasten2 / README.MD
Last active June 13, 2020 01:10
Use a local OneSignal SDK .aar file with Android Studio

Using a local onesignal.aar file

  1. Create a libs folder under the app directory in your project.
  2. Place onesignal.aar in the newly created app/libs directory.
  3. Open your project's root build.gradle file and add the folowing under repositories {...}.
flatDir {
  dirs 'libs'
}
  1. Open your app/build.gradle.
@darkdukey
darkdukey / Design.md
Last active August 29, 2015 14:10
Cocos PackageManager

Package Manager

Package Manager provides a way for developers to easily extend cocos2d-x with plugins

Core Features:

  • Modularize coocs2d-x enable developers to customize the engine for their own game
  • Developers can search, manage and install plugins
  • Update project for the developers when install, remove or update the plugin
  • Developers can share their plugin with others
@ngandriau
ngandriau / Sandbox.groovy
Created July 6, 2013 17:34
surprise when using string variable/constant as Map's key
// Illustration of a side effect when using string variable/constant for map's key
def PROP_NAME = "property name"
def myMap = [PROP_NAME: "a Value"]
//assert myMap.keySet().iterator().next() == "property name"
// fails at runtime but it compiles.
// I was expecting the value of the variable to be the key, but it is in fact a String with the name of the variable
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code