Skip to content

Instantly share code, notes, and snippets.

Nur Rony nmrony

Block or report user

Report or block nmrony

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
@nmrony
nmrony / compile-nginx-from-source.sh
Last active Sep 27, 2019
All configuration files needed to install nginx on Ubuntu 16.04 Compile Nginx from source with nginx-rtmp-module, pagespeed and cache-purge module.
View compile-nginx-from-source.sh
#change it to latest version
NPS_VERSION=1.11.33.0;
echo "Changing Directory to $HOME..."
cd $HOME;
echo "Nginx version to install: " && \
read NGINX_VERSION && \
echo "Downloading nginx-$NGINX_VERSION..." && \
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
echo "Installing Nginx Dependencies..." && \
@nmrony
nmrony / README.md
Created Jul 6, 2019 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack
@nmrony
nmrony / clean-up-boot-partition-ubuntu.md
Created May 8, 2019 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@nmrony
nmrony / git-recover-branch.md
Created May 4, 2019 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted
View git-recover-branch.md

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@nmrony
nmrony / flutter_input_password_toggle.dart
Last active Apr 2, 2019 — forked from slightfoot/input_password_toggle.dart
Input Password Toggle and Form Validation, Above Keyboard Widget, Form Focus, Progress Button, State Separation - 27th March 2019 #HumpDayQandA
View flutter_input_password_toggle.dart
import 'package:flutter/foundation.dart' show ValueListenable; // should be exported by widgets
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(Provider<LoginApi>(
value: LoginApiImpl(),
child: TestApp(),
));
}
@nmrony
nmrony / install-php5.6.sh
Last active Feb 10, 2019
Installing PHP to configure Nginx
View install-php5.6.sh
#install dependencies
sudo add-apt-repository ppa:ondrej/php -y && sudo apt-get update && \
sudo apt-get install make \
php5.6 \
php5.6-mongo \
php-pear \
php5.6-dev \
php5.6-mysql \
php5.6-common \
php5.6-cli \
@nmrony
nmrony / phabricator-aphlict.service
Last active Feb 1, 2019 — forked from sparrc/phabricator_readme.md
Phabricator Ubuntu Installation Guide
View phabricator-aphlict.service
[Unit]
Description=Phabricator Aphlict
After=syslog.target network.target mysql.service
[Service]
Type=forking
User=phabricator
Group=phabricator
ExecStart=/home/phd/phabricator/bin/aphlict start
ExecStop=/home/phd/phabricator/bin/aphlict stop
@nmrony
nmrony / NavigationPrompt.jsx
Created Jan 23, 2019 — forked from bummzack/NavigationPrompt.jsx
A replacement component for the react-router `Prompt`.
View NavigationPrompt.jsx
import React from 'react';
import {withRouter} from 'react-router-dom';
import PropTypes from 'prop-types';
/**
* A replacement component for the react-router `Prompt`.
* Allows for more flexible dialogs.
*
* @example
* <NavigationPrompt when={this.props.isDirty}>
@nmrony
nmrony / handler.js
Created Mar 28, 2017 — forked from jonascheng/handler.js
AWS Lambda blueprint cloudwatch-alarm-to-slack
View handler.js
'use strict';
/**
* Follow these steps to configure the webhook in Slack:
*
* 1. Navigate to https://<your-team-domain>.slack.com/services/new
*
* 2. Search for and select "Incoming WebHooks".
*
* 3. Choose the default channel where messages will be sent and click "Add Incoming WebHooks Integration".
@nmrony
nmrony / StringCompare.md
Created Oct 26, 2018 — forked from Yengas/StringCompare.md
Java String comparison, differences between ==, equals, matches, compareTo
View StringCompare.md

String Comparison

In this gist, i will try to explain you what is the main differences between known string comparison techniques and where to use them.

Explanation of methods

==

This is the main equality operator in Java. To summarize it, this method compares the left and right hands references to eachother and returns boolean. This means this operator returns true only if left and right variable both point at the same Object in the memory. As in most of the class comparisons, this operators is discouraged to use if you're not really intented to check if two variables point to same object.

You can’t perform that action at this time.