This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_blog_action_styles() { ?> | |
<style> | |
.dt-blog-action { | |
text-align: center; | |
padding: 25px; | |
} | |
.dt-blog-action > a { | |
position: relative; | |
overflow: hidden; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_blog_action_styles() { ?> | |
<style> | |
.dt-blog-action { | |
text-align: center; | |
padding: 25px; | |
} | |
.dt-blog-action > a { | |
position: relative; | |
overflow: hidden; |
OlderNewer