Skip to content

Instantly share code, notes, and snippets.

View abirAbuAsim's full-sized avatar
🎯
Focusing

Abir Khan abirAbuAsim

🎯
Focusing
View GitHub Profile
@abirAbuAsim
abirAbuAsim / README-Template.md
Created February 26, 2020 18:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@abirAbuAsim
abirAbuAsim / javascriptVarExampleUsingForLoop.js
Last active June 13, 2019 04:05
Weirdly enough, when you declare a var anywhere inside a method it gets the scope of the method's scope it resides in.
function simpleForLoopToShowVarBehavior() {
for(var i = 0; i < 10; i++) {
console.log(i); // You may think that i is scoped only inside this for loop
}
console.log(i); // Voila, for some magical reason you see '10' as output of this line
// which means Javascript Var is not the variable declaration that you dreamt of
// The i variable gets the value '10' from the last iteration of the for loop
}
@abirAbuAsim
abirAbuAsim / jsVarExampleUsingForLoop.js
Created June 13, 2019 04:01
Weirdly enough, when you declare a var anywhere inside a method it gets the scope of the method's scope it resides in.
function simpleForLoopToShowVarBehavior() {
for(var i = 0; i < 10; i++) {
console.log(i); // You may think that i is scoped only inside this for loop
}
console.log(i); // Voila, for some magical reason you see '10' as output of this line
// which means Javascript Var is not the variable declaration that you dreamt of
// The i variable gets the value '10' from the last iteration of the for loop
}
@abirAbuAsim
abirAbuAsim / phalconphp_php7_ubuntu_16_04_vagrant.sh
Last active February 27, 2018 09:23 — forked from Tosyn/phalconphp_php7_ubuntu_16_04.sh
PhalconPhp with PHP7 Installation on Ubuntu 16.04 inside vagrant box
#!/bin/bash
# PhalconPhp with PHP7 installation on ubuntu:16.04
sudo apt-get update
sudo apt-get install -y php7.0-fpm \
php7.0-cli \
php7.0-curl \
php7.0-gd \
@abirAbuAsim
abirAbuAsim / all_duplicate_items_index.py
Created April 5, 2017 06:42
Finds all the indices of duplicate items occurring in a list.
# find all the indices of a duplicate item
def list_duplicates_of(seq,item):
start_at = -1
locs = []
while True:
try:
loc = seq.index(item,start_at+1)
except ValueError:
break
else:
@abirAbuAsim
abirAbuAsim / JSPForm.jsp
Created March 22, 2017 14:48
A simple JSP form to insert form data into mySQL database
<!DOCTYPE HTML>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<HTML>
<head>
<title>This is a jsp page</title>
</head>
<body>
@abirAbuAsim
abirAbuAsim / Cricketer3.java
Last active April 1, 2016 05:07
class with methods & encapsulation
/**
* This program shows a class with methods and also implements
* encapsulation by getter and setter methods.
*
* @author Abir Khan A.K.A AbSak
* @version April 01, 2016
*/
public class Cricketer3 {
/* Instance variables */
private String name = "";
@abirAbuAsim
abirAbuAsim / Cricketer2.java
Last active April 1, 2016 04:42
Different objects of the same class
/**
* This program shows how two objects of the same class can
* hold their own values separately and act independently.
*
* @author Abir Khan A.K.A AbSak
* @version 2.0
*/
public class Cricketer2 {
private String name = "";
private int runs = 0;
@abirAbuAsim
abirAbuAsim / Cricketer1.java
Last active March 28, 2016 06:35
Learning about Class and Object
/**
* This program shows how to create a class with only instance
* variables in it, how to declare an object, how to manipulate an
* instance variable and show their value.
*
* @author Abir Bin Ayub Khan A.K.A AbSak
* @version March 28, 2016
*
*/
public class Cricketer1 {