Skip to content

Instantly share code, notes, and snippets.

View shiv19's full-sized avatar
🎯
Focusing

Shiva Prasad shiv19

🎯
Focusing
View GitHub Profile
@shiv19
shiv19 / useful.sh
Created November 5, 2018 19:49 — forked from veggiemonk/useful.sh
Useful commands
# Commands that are useful once in a while but not always for everyday usage
# Remove all node_modules forlder recursively
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
# List globally installed npm package
npm list -g --depth=0
# Loop over files in the current dir
for f in *; do
@shiv19
shiv19 / README.md
Created August 22, 2018 12:15 — forked from surdu/README.md
ngIf for vanilla JS + NativeScript

What ?

This is the equivalent of using ngIf in angular + {N}, but for vanilla JS + {N}

Why ?

As opposed to using visibility attribute, this will not add the component specified in the template to the view, so the hidden component's loaded event won't be triggered until the component is shown.

@shiv19
shiv19 / gist:f6332ba1f9ceb9db8642cb682d59cefc
Created December 26, 2017 19:01 — forked from burkeholland/gist:7475bb40a305d9f35494
Customizing The Navigation Bar / Status Bar

As I've been learning more and more about NativeScript, one of the first tasks I really dove into was learning how to customize the Navigation Bar for an iOS app. NativeScript has a Navbar component on the roadmap, but for now, it requires some knowledge about the underlying iOS implementation of UINavigationControllers, UIViewControllers and the like.  But fear not!  I have braved the treacherous waters of StackOverflow and the Objective-C docs and emerged, victorious and unscathed.

1

In this article, I’ll go over a few of the more common tweaks that you might be needing to make to the Navigation Bar or Status Bar. While NativeScript is a cross-platform framework, these tweaks apply specifically to iOS. However, most of the items that I will

class MaxHeap{
constructor(){
this.data = [];
this.position = 1;
}
insert(value){
this.data[this.position] = value;