May 29, 2016

How To Unblock an IP Address in CSF

How To Unblock an IP Address in CSF
Category: Technical Support
CSF is generally considered an advanced firewall given it has many more configuration options than most other software firewalls (such as APF). It’s also still simple enough to install and configure, even for novice system administrators. For a simple overview on how to install and configure CSF and its security plugin LFD (Login Failure Daemon), visit our tutorial.

Check CSF for Your IP Address
Let’s say that you want to check whether or not a specific IP address, maybe 8.8.8.8 , is blocked by CSF. That’s easy!

csf -g 8.8.8.8

Unblock an IP Address
If the IP address is denied in CSF and you want to remove it, then use this command:

csf -dr 8.8.8.8

CSF then needs to be restarted for the change to take effect:

csf -r

Feb 21, 2016

Mirror a Website (Downloading everything on a website recursively)

Other words> Find all download links on a website recursively:

wget -m http://website.com/

SOURCE

Nov 2, 2015

Get Device Screen Size in Cordova/PhoneGap App

Identifying size of device screen is easy in a Cordova application. But is not available directly. We can get the screen object from window.screen and it has width and height properties. The problem is, these width and height may not represent physical screen, but the concept called CSS pixel.
Fortunately there is property window.devicePixelRatio which keep the ratio from physical pixels to CSS pixels. We can use this value to get physical screen size as given below.

var physicalScreenWidth = window.screen.width * window.devicePixelRatio;
var physicalScreenHeight = window.screen.height * window.devicePixelRatio;
Please note that the value will change depending on current orientation of screen.
Hope the above helps. Please feel free to get in touch to know more.

SOURCE

May 20, 2015

Vertical align anything with just 3 lines of CSS

.element {
  position: relative;
  top: 50%;
  transform: translateY(-50%);

source

Logos and images not showing on Yoothemes

When you go to permalink settings, you click to "postname" then in the custom compare "/%postname%/" you must eliminate all the the "/" and all go well. in my site is ok now.

SOURCE

Wordpress Visual editor messing with the formatting (

tags etc)

This plugin Stops the automatic forming and the HTML tag removal in the html mode of WordPress, and generates a natural paragraph and changing line.

SOURCE

Apr 16, 2015

SONY VEGAS - Not Responding when loading a project


1 - Start Vegas 12
2 - Close the "Project Media" window
3 - Open your troublesome project

Does it open much faster?

4 - Open the "Project Media" window

Does Vegas go "Not responding" for a long time?

What you're experiencing is similar to what I've seen when opening a large project started in an older version of Vegas. No amount of futzing would make it open as fast as a project started in Vegas 12. I've have no solution yet.

SOURCE

Jan 19, 2015

AE - Blink Expression Effect


In the timeline, select the Opacity property, ALT + CLICK then:

rate = 5;
n = Math.sin(time*rate);
if ( n < 0) 0 else 100

SOURCE

Jun 26, 2014

Create a New WordPress Admin User from PHP

<?php
// ADD NEW ADMIN USER TO WORDPRESS
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.

require_once('wp-blog-header.php');
require_once('wp-includes/registration.php');

// CONFIG
$newusername = 'YOURUSERNAME';
$newpassword = 'YOURPASSWORD';
$newemail = 'YOUREMAIL@TEST.com';

// Make sure you set CONFIG variables
if ( $newpassword != 'YOURPASSWORD' &&
  $newemail != 'YOUREMAIL@TEST.com' &&
  $newusername !='YOURUSERNAME' )
{
 // Check that user doesn't already exist
 if ( !username_exists($newusername) && !email_exists($newemail) )
 {
  // Create user and set role to administrator
  $user_id = wp_create_user( $newusername, $newpassword, $newemail);
  if ( is_int($user_id) )
  {
   $wp_user_object = new WP_User($user_id);
   $wp_user_object->set_role('administrator');
   echo 'Successfully created new admin user. Now delete this file!';
  }
  else {
   echo 'Error with wp_insert_user. No users were created.';
  }
 }
 else {
  echo 'This user or email already exists. Nothing was done.';
 }
}
else {
 echo 'Whoops, looks like you did not set a password, username, or email';
 echo 'before running the script. Set these variables and try again.';
}
?>

SOURCE