Skip to content

Instantly share code, notes, and snippets.

View mhasan3's full-sized avatar
🎯
Focusing

Mahmudul Hasan mhasan3

🎯
Focusing
View GitHub Profile
@mhasan3
mhasan3 / gulp.js
Last active August 29, 2015 14:05
test gulp file
var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var stripDebug = require('gulp-strip-debug');
var uglify = require('gulp-uglify');
gulp.task('css', function() {
return gulp.src('assets/css/sentinel.css')
@mhasan3
mhasan3 / shortcode.md
Created May 26, 2015 16:18
Adding shortcodes to visual composer.

Shortcodes in Visual Composer

For example you have your own shortcode "hello_name":

function hello($atts, $content) {

extract(shortcode_atts( array(

'salutation' => !empty($salutation) ? $salutation : 'Mr.', 
@mhasan3
mhasan3 / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Basic Google Chrome Extensions Developing

Google Chrome is by far the easiest browser to make extensions for, as you will see from the steps below. We can build an extension for it using only HTML, CSS, and JavaScript.


Testing Your Very First Extension

Assert:

এই মডিউল টি অ্যাপ্লিকেশনের ইউনিট টেস্ট লেখার জন্য ইউজ করা হয়। এটিকে অ্যাকসেস করা হয়:

require('assert')

Buffer:

@mhasan3
mhasan3 / gist:c7fd5935025582f1729a
Last active September 1, 2015 09:11 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
1. Download the "Install OS X Yosemite.app" form App Store and keep it in Applications Folder
2. Open the Terminal and just hit the command
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
Then It will show the Following message
"Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
<html>
<head>
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="height: 400px; width: 500px;">
</div>
<script type="text/javascript">
find . -name '*.DS_Store' -type f -delete
@mhasan3
mhasan3 / 01 - Theme Testing Process.markdown
Last active December 1, 2016 19:26 — forked from AlphaGit/01 - Theme Testing Process.markdown
Theme testing process (from Wordpress Codex)

Theme Testing Process

from Theme Development (Wordpress Codex)

  • Fix PHP and WordPress errors. Add the following debug setting to your wp-config.php file to see deprecated function calls and other WordPress-related errors: define('WP_DEBUG', true);. See Deprecated Functions Hook for more information.
  • Check template files against Template File Checklist.
  • Do a run-through using the Theme Unit Test.
  • Validate HTML and CSS. See Validating a Website.
  • Check for JavaScript errors.
  • Test in all your target browsers. For example, IE7, IE8, IE9, Safari, Chrome, Opera, and Firefox.
  • Clean up any extraneous comments, debug settings, or TODO items.