Skip to content

Instantly share code, notes, and snippets.

View AminulBD's full-sized avatar

Aminul Islam AminulBD

View GitHub Profile
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi (maintainer)
// - Michael Herf (Pulse Algorithm)
(function(){
// Scroll Variables (tweakable)
@AminulBD
AminulBD / mikrotik-command-local-bandwidth
Last active August 29, 2015 14:14
MikroTik RouterOS Local Bandwidth Control
10.20.0.0/16 are my pppoe client ip pool.
192.168.250.0/24 is FTP server pool. Behind Mikrotik DMZ.
/ip firewall mangle add chain=prerouting src-address=10.20.0.0/16 dst-address=192.168.250.0/24 action=mark-packet new-packet-mark=local-up
/ip firewall mangle add chain=postrouting src-address=192.168.250.0/24 dst-address=10.20.0.0/16 action=mark-packet new-packet-mark=local-down
/queue type add name=local-speed kind=sfq
/queue tree add name=local-up parent=global packet-mark=local-up queue=local-speed max-limit=100M
/queue tree add name=local-down parent=global packet-mark=local-down queue=local-speed max-limit=100M
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
#!/usr/bin/env php
<?php
foreach(glob("*.css") as $css){
echo "wp_enqueue_style( 'wptheme-{$css}', get_template_directory_uri().'/css/{$css}',null,'1.0');\n";
}
@AminulBD
AminulBD / enq-js.php
Last active August 29, 2015 14:22 — forked from hasinhayder/enq-js.php
#!/usr/bin/env php
<?php
foreach(glob("*.js") as $js){
echo "wp_enqueue_script( 'wptheme-{$js}', get_template_directory_uri().'/js/{$js}', array('jquery'),'1.0',true);\n";
}
@AminulBD
AminulBD / form.html
Last active May 4, 2023 17:48
Mailchimp Ajax Subscribe For WordPress
<form class="newsletter-form top-margin-80 aw-mc-ajax-form" action="<?php echo admin_url( 'admin-ajax.php'); ?>" method="post">
<input name="action" type="hidden" value="aw_chimp_subscribe">
<div class="field-inside">
<i class="fa fa-envelope-o"></i>
<input type="text" name="email" class="email-field" placeholder="Type your email address...">
<button type="submit">
<span cLass="subscribe-text">
<?php _e( 'Subscribe', 'appsworld' ); ?>
</span>
<span cLass="ajax-loader">
# Based on https://gist.github.com/fernandoaleman/5083680
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
@AminulBD
AminulBD / breadcrumb.php
Created August 9, 2015 05:35
Breadcrumb for any wordpress theme.
/**
* Bredcrumbs
*
* @since 1.0.0
*/
function mytheme_the_breadcrumb () {
// Settings
$separator = '';
@AminulBD
AminulBD / mailchimp-subscribe-wp-ajax.php
Created September 11, 2015 12:27
Mailchimp Subscribe for wordpress ajax.
/**
* Mailchimp Email Subscription Handler
*
* @since 1.0.0
* @version 1.0.0
* @author Aminul Islam <aminmedia@gmail.com>
*/
function yourtheme_mailchimp_subscribe() {
// MC API and List ID
@AminulBD
AminulBD / swiperinit.html
Last active September 4, 2021 08:53
Swiper Initialization with data attribute and Animate.css integrate
<div id="content-carousel" class="content-carousel-widget" data-carousel="swiper">
<!--
You can use: data-items="5" for total items display in single page
data-autoplay="true" or "false" for autoplay.
data-loop="true" or "false" for looping the carousel
data-effect="fade" or "cube" for slide changing effects
data-direction="horizontal" or "vertical" for sliding direction
data-initlal="3" for for first active slide
data-center="true" or "false" for centerize slider
-->