git remote prune origin --dry-run
git remote prune origin
function curry(fn) { | |
if (fn.length <= 1) return fn; | |
const generator = (...args) => { | |
if (fn.length === args.length) { | |
return fn(...args) | |
} else { | |
return (...args2) => { | |
return generator(...args, ...args2) |
function cached(fn){ | |
// Create an object to store the results returned after each function execution. | |
const cache = Object.create(null); | |
// Returns the wrapped function | |
return function cachedFn (str) { | |
// If the cache is not hit, the function will be executed | |
if ( !cache[str] ) { | |
let result = fn(str); |
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
/* | |
reference link ->https://www.opengeeks.me/2015/08/filechooser-and-android-webview/ | |
https://github.com/OpenGeeksMe/Android-File-Chooser | |
*/ | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.net.Uri; |
class MaxHeap{ | |
constructor(){ | |
this.data = []; | |
this.position = 1; | |
} | |
insert(value){ | |
this.data[this.position] = value; |
// Usage: <Label maxLines="3" .. /> | |
import { Directive, ElementRef, Input, OnInit, OnChanges } from '@angular/core'; | |
import { Label } from 'tns-core-modules/ui/label'; | |
declare const android, NSLineBreakMode: any; | |
@Directive({ | |
selector: 'Label[maxLines]', | |
}) |
Ok, I have on-device remote store debugging working with Ionic 2. Unfortunately, time-travel and state import doesn't work with store-devtools
yet (see ngrx/store-devtools#33 and ngrx/store-devtools#31), but at least the Inspector, Log Monitor and Graph is working remotely. Here's how:
First, add https://github.com/zalmoxisus/remotedev to the project:
> npm install --save-dev remotedev
Then add these devtools proxy wrapper classes to the project. They provide the same interface as the browser extension so store-devtools will think it's just talking to the chrome extension. I left in the trace debug logging so you can clearly see what's happening in the console, but it's easy to remove if you want.