Skip to content

Instantly share code, notes, and snippets.

View humayunahmed8's full-sized avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
@humayunahmed8
humayunahmed8 / component_shortcode.php
Created June 10, 2018 06:21
Some bootstrap 3 component shortcode for WordPress.
<?php
/*
Plugin Name: Stock Toolkit
*/
//Progress Bar Shortcode
function stock_progress_shortcode($atts, $content = null){
@humayunahmed8
humayunahmed8 / javascript-loop.js
Created June 28, 2018 09:34
JS Loop - For, (While, Do/While, For/In)
/*=====For Loop=====*/
//for (variable; condition; incriment/decriment) {
// Your Document
}
var x;
for (x=56; x<=61; x++) {
document.write(x+'<br/>');
@humayunahmed8
humayunahmed8 / Javascript-array.js
Last active June 28, 2018 10:28
Javascript Array.
//Array with multiple line
var data=[];
data[0]=10;
data[1]=20;
data[2]=30;
data['name']='blackdiamond';
@humayunahmed8
humayunahmed8 / Javascript-fucntion.js
Created June 28, 2018 10:31
Javascript Function
// Javascript Funciton
function demo() {
var firstName = 'Humayun';
var lastName = 'Ahmed';
var fullName = firstName+' '+lastName;
document.write(fullName);
}
demo();
// Switch Statement
var x = 100;
switch (x) {
case 5:
document.write('Hello Bangladesh');
break;
case 10:
@humayunahmed8
humayunahmed8 / javascript-statement.js
Created June 28, 2018 10:34
Javascript Conditional Statement (if/else/esle-if)
// Conditonal Statement
var x = 30;
var y = 20;
// If Statement
@humayunahmed8
humayunahmed8 / Javascript-operators.js
Last active June 28, 2018 10:51
Javascript Operators
// Arithmatical Operator
var x=130;
var y=90;
document.write(x+y); // Addition
document.write('<br/>');
document.write(x-y); // Substaction
document.write('<br/>');
document.write(x*y); // Multiplication
@humayunahmed8
humayunahmed8 / gist:d8a558c55508781dd9f3c55a8541d462
Last active June 28, 2018 10:56
Javascipt Basic Syntax, (variable,contatinate,negation,datatypes,document.write,alert,getElementById,innerHTML)
Javascript Variable:
====================
1. You can use (A-Z) Capital Letter.
2. You can use (a-z) Shorthand Letter.
3. You will use (0-9) Numeric Number.
4. But, You can not write any numeric number in the frist of variable.
** Stucture: variable variable_name = variable_data;
** E.g : x = "Hello Bangladesh"
@humayunahmed8
humayunahmed8 / wp_function.php
Last active July 18, 2018 03:37
Most Important WordPress Function
1. Get Header
==============
<?php get_header( $name ); ?>
=>Parameters
# $name (Calls for header-name.php)
=> Different header for different pages.
<?php
if ( is_home() ) :
@humayunahmed8
humayunahmed8 / maps-shortcode.php
Created July 19, 2018 06:15
Google Maps Shortcode (Static)
function crazyland_maps_shortcode($atts) {
$default = array(
'lat' => '22.9196383',
'lon' => '91.520781',
'zoom' => '16',
'width' => '600',
'height' => '400',
);