Skip to content

Instantly share code, notes, and snippets.


Harpreet singh harry1064

View GitHub Profile
harry1064 / ELK with
Created Mar 28, 2018 — forked from Dev-Dipesh/ELK with
Setting up Elasticsearch, Logstash and Kibana with Nginx.
View ELK with

ELK (Elasticsearch Logstash Kibana)

Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:

  • Model => Elasticsearch (for Storage, Indexing & Search)
  • View => Kibana (for DataViz & G-Man, yeah the one in half life 😏)
  • Controller => Logstash (For Logs & Filtering)

harry1064 /
Last active Oct 27, 2017
Remote Node.js Debug using webstorm

Debugging node running on a remote server

The following shows you how to start node with the debug flag and use an SSH tunnel to access the right port.

Things you need:

  • ssh access to the server
  • ability to restart node app with --debug flag.

Debugging using Webstorm

harry1064 / storage.swift
Created Aug 7, 2017 — forked from avdyushin/storage.swift
CoreData stack for iOS 9 and iOS 10 using Swift 3
View storage.swift
// Storage.swift
// Created by Grigory Avdyushin on 30.06.16.
// Copyright © 2016 Grigory Avdyushin. All rights reserved.
import UIKit
import CoreData
View test
<script type="text/javascript">
function showFrontLayer() {
function hideFrontLayer() {
View Dismising keyboard on scrollview
up vote
down vote
Here is the cleanest way to achieve this in iOS 7.0.
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
View Encoding and Decoding image in base64 in ios
iOS7 > version
You can use NSData's base64EncodedStringWithOptions
Encoding :
- (NSString *)encodeToBase64String:(UIImage *)image {
return [UIImagePNGRepresentation(image) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
View Module Design pattern
You can’t perform that action at this time.