Skip to content

Instantly share code, notes, and snippets.

Harpreet singh harry1064

  • Quinto
  • Pune
Block or report user

Report or block harry1064

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

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
harry1064 / instructions.md
Last active Oct 27, 2017
Remote Node.js Debug using webstorm
View instructions.md

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
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
<html>
<head>
<META HTTP-EQUIV="EXPIRES" CONTENT="-1" />
<script type="text/javascript">
function showFrontLayer() {
document.getElementById('bg_mask').style.visibility='visible';
document.getElementById('frontlayer').style.visibility='visible';
}
function hideFrontLayer() {
View Dismising keyboard on scrollview
up vote
55
down vote
Here is the cleanest way to achieve this in iOS 7.0.
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
Or
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
View Encoding and Decoding image in base64 in ios
Objective-C
iOS7 > version
You can use NSData's base64EncodedStringWithOptions
Encoding :
- (NSString *)encodeToBase64String:(UIImage *)image {
return [UIImagePNGRepresentation(image) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
}
View Module Design pattern
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
You can’t perform that action at this time.