Skip to content

Instantly share code, notes, and snippets.

View arifhp86's full-sized avatar

Arifur Rahman arifhp86

View GitHub Profile
@arifhp86
arifhp86 / GET Superglobal in Javascript
Created May 30, 2018 16:21
GET Superglobal in Javascript
var getParam = (function() {
var query = location.search.substr(1);
var params = {};
if(query) {
query.split("&").forEach(function(part) {
var item = part.split("=");
params[item[0]] = decodeURIComponent(item[1]);
});
}
return function(paramName) {
@arifhp86
arifhp86 / Open all link of webpage
Created March 4, 2018 18:30
Open all link of webpage in few seconds interval
git add .
git commit -m "comment"
git push origin master
git pull
git remote add origin <server>
git branch <branchname>
git checkout <branchname>
git merge <branchname>
git branch -d <branchname>
git push
@arifhp86
arifhp86 / Laravel symbolic link
Last active February 10, 2024 11:27
Laravel symbolic link creation with cron in shared hosting
@arifhp86
arifhp86 / js.md
Created August 25, 2017 13:38 — forked from nuhil/js.md
Javascript Handbook

Javascript Handbook

A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.

Comments


Single line comments start with //. For multi-line commands, you use /* ... */

// This is a single line comment
@arifhp86
arifhp86 / webpack.config.js
Created March 1, 2017 18:15 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@arifhp86
arifhp86 / bddistrict-shortcode.php
Created January 14, 2017 19:53 — forked from hasanet/bddistrict-shortcode.php
Wordpress Contact Form 7 Shortcode - Dropdown List of all the 64 Districts of Bangladesh (For Both Bangla and English Language, Alphabetically)
<?php
/*
CREATED: January 17, 2017.
Instructions:
- This is not a plugin. So, Do not Download this file and install it on your wordpress site. Just copy any of the below code and paste it on the "form editor" of Wordpress Contact form 7 Plugin.
- You need to insert the corresponding mail-tag ([bangladesh-district]) into the field on the Mail tab.
@arifhp86
arifhp86 / FluentCalculator.js
Created October 13, 2016 23:36
Fluent Calculator [js]
var Magic = function() {
var value = 0;
var operators = {
'plus': (a, b) => a + b,
'minus': (a, b) => a - b,
'times': (a, b) => a * b,
'dividedBy': (a, b) => a / b
};
var prefix = (/mozilla/.test(navigator.userAgent.toLowerCase()) &&
!/webkit/.test(navigator.userAgent.toLowerCase())) ? '-moz-' :
(/webkit/.test(navigator.userAgent.toLowerCase())) ? '-webkit-' :
(/msie/.test(navigator.userAgent.toLowerCase())) ? '-ms-' :
(/opera/.test(navigator.userAgent.toLowerCase())) ? '-o-' : '';
@arifhp86
arifhp86 / dl.php
Created July 23, 2016 02:56 — forked from fzerorubigd/dl.php
A simple download script with resume and multi-part support
<?php
date_default_timezone_set('GMT');
//1- file we want to serve :
$data_file = "/home/f0rud/Aalto Talk with Linus Torvalds [Full-length].mp4";
$data_size = filesize($data_file); //Size is not zero base
$mime = 'application/otect-stream'; //Mime type of file. to begin download its better to use this.
$filename = basename($data_file); //Name of file, no path included