Posts

How to fix 500 internal privoxy error

I keep getting a 500 Internal Privoxy Error when I open a particular URL. I t ried several websites that promise a fix but only want to sell me some bullshit software for $29.95 that doesn't do anything.   The actual message is as follows 500 Internal Privoxy Error Privoxy encountered an error while processing your request: Could not load template file connect-failed or one of its included components. Please contact your proxy administrator. If you are the proxy administrator, please put the required file(s)in the (confdir)/templates directory. The location of the (confdir) directory is specified in the main Privoxy config file. (It's typically the Privoxy install directory). After spending so much of time and putting lots of effort at internet, finally I fixed it. The solutions is -- Disable proxy settings and check. Press “Windows Logo” + “R” keys on the keyboard, type “inetcpl.cpl” and press “Enter”. Click the “Connections” tab, and then click “LAN settings...

How can you make 10 dollars per day with google Adsense?

If you are reading my post, I think that you want to  increase your adsense income $0 to $10   per day . Most beginning bloggers might earn about one dollar a year. When you have several hundred posts and are starting to attract hundred or more visitors every day, you might see as much as ten dollars per month. But if you have a popular blog, with thousands  high ranking search engine posts , and probably at least a thousand visitors each day, it will be able to earn $10 per day with a single blog. That means it’s totally depend on your  quality traffic and search engine ranking . Once you learn how to consistently make $10 a day from the Internet you can change your goal to $20 a day and continue to increase your goal until you begin to earn a full-time income working from home. 1. How To Make $1 Per Day From Adsense: Your blog requires minimum 100 search engine visits and 250 Page views totally per day to reach one dollars daily. 2. How To Make $5 Per Day From...

Modern Business: The Secret to Success

Image
Running a successful modern business demands a number of different skills and you, as the business owner, must be ready to organize your time and be prepared to take any shift necessary because in these troubled economic times you are the most responsible figure for the success of your business. Teamwork skills are especially important, and managing the duties of every employee is something you should worry about, but the end line here is that you need to be able to quickly adapt. In this economic climate, ups and downs are a natural part of every major business, and some things can move increasingly fast, while others can require a tremendous amount of time to be fully implemented, especially new technologies that are important for your area of work. However, what are the most important aspects you need to work on? Well, there is no magical solution, but we have created a list of things you need to keep your eye on. The importance of market research Doing proper market rese...

Why your business should go Social

Image
Word of mouth marketing is as old as business itself. Consumers have always relied on conversations over the back fence and around the water cooler when making a decision about the products and services they need, social media is about that conversation, it may change the fence but the idea remains. Social media marketing gets your name in the minds of your friends and your friend's friends, easier and for less cost than traditional means. Social Media marketing is about using the tools provided by social sites to build a repuation and create a buzz for you and your business, it is about establishing yourself as an expert so people will recommend you in conversations over backyard fences and in online interactions. Same Old Word-of-Mouth Marketing Social Media has changed the way people connect, discover, and share information. Here’s what you need to know:  Social media is the technology that connects people—whether it’s to share content or just to chat. Social n...

create filter in controller symfony2

Sometimes you need to make changes to the Response object, after it is returned by your controller, but before it is rendered as output to the client (e.g. the browser). You may want to set some extra response headers, or " completely mess up the content " of the response. You can accomplish this by creating an event listener that listens to the kernel.response event. I give you a sample event listener which changes the Content-Type header in case the requested format is json and the browser’s accepted response format contains "text/html" in that case, at least in my experience, the browser doesn’t render the JSON string as plain text when the status code is 4xx or 5xx. So in these situations, the event listener changes the “ Content-Type ” to “ text/plain ”, to be sure you always get decent output in the browser. Put the event listener in, for example /src/Acme/DemoBundle/EventListener/ResponseListener.php : namespace Acme\DemoBundle\EventListener;...

remove non ASCII characters from a String

Hi guys I had a problem with removing non-utf8 characters from string, which are not displaying properly. Characters are like this 0x97 0x61 0x6C 0x6F (hex representation). I am getting some encoded value from url. Let assume it's encoded email and value is ankitchauhan22@gmail.com When I tried to find out the length of this string as $email = somefunction($encodedStringFromUrl); $length = strlen($email); print $length; I was shocked. It's printing 37 instead of 24. Than I printed each index of this string on the string but after 24 character, nothing printed. I used trim() to remove whitespace but didn't work. Then I tried something which worked for me. This is a little snippet that will remove any non-ASCII characters from a string. $string = "ankitchauhan22@gmail.com äó"; $string = preg_replace('/[^(\x20-\x7F)]*/','', $string); Now It's printing 24.

jQuery & JavaScript PDF Viewer plugin

Image
Hi guys In this Post I'm providing best jQuery PDF viewer plugin & tutorial with examples. Due to popularity of online document viewer like Google Docs some javascript developers develop a good and useful plugins to view pdf file on online pdf viewer.Here is some good list of online pdf viewers. JavaScript PDF Reader : pdf.js It's an HTML5 experiment that explores building a faithful and efficient PDF renderer without native code assistance. Read More Demo jQuery Media Plugin The jQuery Media Plugin supports unobtrusive conversion of standard markup into rich media content. It can be used to embed virtually any media type, including Flash, Quicktime, Windows Media Player, Real Player, MP3, Silverlight, PDF and more, into a web page and is compatible with all web hosting services The plugin converts an element which holds the object, embed iframe tags neccessary to render the media content. Demo PDFObject : Embeds PDF files into HTML documents A JavaScript ...

css3 tips and tricks collection

You can never have too much of a good thing–and two good things we rely on in our work are tips and tricks. Nuggets of information, presented clearly and succinctly, help us build solutions and learn best practices. CSS level 3 has been under development since December 15, 2005. CSS3 is modularized and consists of several separate recommendations. CSS3 is one of the more exciting and versatile developments for the web in some time. In this article I am going to create a huge list of CSS3 Tips, Tricks and Tutorials for Web Developers. Useful Link : Be updated with these Featured Table Design With CSS3 Basic CSS3 Techniques That You Should Know CSS3 Animated Bubble Buttons How To Create CSS3 Christmas Tree Ornaments Quick Tip : New HTML5 Form Features The State Of CSS3 In Email Templates CSS3 Transition Tutorial – Menü mit Slide-Effekt im Apple-Style Semantic CSS3 Lightboxes Creating A Realistic Looking Button With CSS3 CSS3 Gradient Buttons Pure CSS3 Speech Bubbles Sha...

speed up symfony2 application with varnish

Hi everyone, Just a quick note about Varnish integration for symfony. I’m sure you have heard of Varnish reverse proxy server. Varnish is a web accelerator written with performance and flexibility in mind. It’s modern architecture gives it a significantly better performance than many of it’s competing products. Varnish store web pages in memory so the web servers don’t have to create the same web page over and over again. The web server only recreate a page when it is changed. Additionally Varnish can serve web pages much faster then any application server is capable of – giving the website a significant speed up. So in first order you may be interested to integrate Varnish to handle pages which don’t require authentication (for myself I’m still not sure if there is any advantage for integrating pages for logged in users): sub vcl_recv { set req.http.Surrogate-Capability = "abc=ESI/1.0"; } sub vcl_fetch { if (beresp.http.Surrogate-Control ~ "ESI/1.0...

Creating a PrestaShop module

Image
A PrestaShop module consists of: A root folder, named after the module, which will hold all of the module's files, and will reside in PrestaShop's /modules folder. A main PHP file, named after the module, located in that root folder. This PHP file should have the same name as its root folder. An icon file, named logo.gif, representing this module. Optional: some .tpl files, containing the module's theme. Optional: language files, if the module or its theme have text to display (and therefore, that should be translatable). Optional: in a /themes/modules folder, a folder with the same name as the module, containing .tpl and language files if necessary. This last folder is essential during modifications of existing module, so that you can adapt it without having to touch its original files. Notably, it enables you to handle the module's display in various ways, according to the current theme. Now I am going to create a module named Testmodule. Your module can b...

Styling Progress Bar With HTML5

Image
0% Reload HTML5 introduced the progress bar element, which allows us to show the progress of certain tasks, like uploads or downloads, basically anything that is in progress Basic Usage The progress bar can be added with <progress> ; the progress value is determined with the value, min and max attributes, as follows. <progress value="40" max="100"></progress> Since this is a native progress bar, the presentation is vary dependent on the platform. Below is how a native progress bar looks in Windows and OSX. Now, let's try styling this progress bar, so it has a consistent or similar look across all platform. Styling Progress Bar In the stylesheet, we actually can use the element selector to target and add style rules to <progress> element. In this example, we change the background color, remove the border line, and make it rounded by adding a border radius at half of its height. progr...

creating stick stylish button using css3

CSS3 is rapidly expanding the toolkit that web developers and designers have to make visually appealing components without the use of images, Photoshop, or CSS sprites. While all of those have their place, and will never be completely removed from the development process, buttons are one component of a website that we can make dynamic, slick and scalable – exclusively in code. All of the CSS3 buttons that we create today will be styled forms of anchor tags. Some like to use button elements for these, but I find it’s easiest to use anchor tags so you can easily add the :hover and :active pseudo classes and quickly add href to it to complete the button. What We're Creating For this tutorial, we’ll be creating several different CSS3 buttons, all of which can have different colors, shadows, sizes – all using pure CSS3. We will be using the following properties: border-radius , linear-gradient , box-shadow , text-shadow and opacity . you might want to change some of these ...

Controllers as Services in Symfony2

Controller as a service is continually touted as the best practice. But why would I wrap a controller into a service? That's good question. Well, the point of doing this in general is not having to inject the DI container into your controllers (instead, you inject the dependencies into the controller directly). Thus the controller no longer depends on the container. Good: You get added flexibility. You no longer hard-code which services to use into your controller. You can specify that in the DI configuration instead. Example: You inject a UserProvider into the UserController for /profile, but inject a FacebookUserProvider into the same UserController for /profile/facebook. Bad: You must manually configure your dependencies in the DIC config. You need to manually assign the injected dependencies. Optional dependencies are no longer lazy-loaded. This is basically just a proof of concept to show how it could be done. namespace Acme\DemoBundle\Controller; class FooContr...

run symfony command from controller

Hi Friends, Few month back I was trying to execute Symfony2 command in my controller. See how can we do that. Step 1 Register you command as service MyCommandService: class: MyBundle\Command\MyCommand calls: - [setContainer, ["@service_container"] ] Step 2 In your controller, you'll just have to get this service, and call the execute method with the rights arguments. Set the input with setArgument method: use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Output\ConsoleOutput; . . . public function myAction() { $command = $this->get('MyCommandService'); $input = new ArgvInput(array('arg1'=> 'value')); $output = new ConsoleOutput(); $command->run($input, $output); } Step 3 Either you can use the execute method of command: $command->execute($input, $ouput); But see the defination of run() and execute() methods. run () -: The code to ...

protecting php file with ionCube encoder

One of the issues PHP developers face is that PHP is an interpreted language, meaning PHP source code is readable by anybody who downloads your applications. In this article I will show you how to protect your intellectual property by encoding your PHP source code. The tool we are going to use to protect our code is ionCube PHP Encoder . Before releasing your PHP software, you use the encoder to convert your plain-text PHP files into special encrypted files. While ionCube PHP Encoder is a commercial product, there is a time-limited trial available for download . Because your PHP is encoded into a special byte-code (as opposed to just being obfuscated), a loader must be installed on your web server. A loader is a PHP module that must be installed. Fortunately, ionCube PHP Encoder is commonly used and therefore many web hosts will already have a loader installed. On the ionCube website there is a loaders page which contains the latest versions of the loader for all supported plat...