Skip to content

Instantly share code, notes, and snippets.

View OrniNoor's full-sized avatar

Sefat Noor Orni OrniNoor

View GitHub Profile
@OrniNoor
OrniNoor / nginx.conf
Created July 29, 2020 19:45 — forked from nateware/nginx.conf
Nginx sample config for EC2
#
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances.
# Also look at the haproxy.conf file for how the backend is balanced.
#
user "nginx" "nginx";
worker_processes 10;
error_log /var/log/nginx_error.log info;
@OrniNoor
OrniNoor / Alert Exit
Created February 8, 2017 19:42
Exit dialouge android
protected void exitByBackKey() {
AlertDialog alertbox = new AlertDialog.Builder(this)
.setMessage("Do you want to exit application?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
// do something when the button is clicked
public void onClick(DialogInterface arg0, int arg1) {
finish();
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
@OrniNoor
OrniNoor / Header template
Last active February 4, 2016 22:46
All headers and macros of c++ code
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>