Profile
Achievement
 
    
                o0110o's Recent Snippets
- All /
 « Prev 1 Next »
Dynamic equal height columns that account for padding and borders.
        
        
        
            1 
        
        
            2430 
        
                    posted 11 years ago by o0110o
            Place this snippent in your script, and call it like this:
urllib.urlretrieve(getFile, saveFile, reporthook=report)
Notice it is the 3rd argument that calls the function on each file that needs to be downloaded.
        
        
        
            1 
        
        
            3669 
        
                    posted 12 years ago by o0110o
            This is a very basic wrapper for querySelectorAll. Just add prototypes and whatever else you need.
        
        
        
            1 
        
        
            2251 
        
                    posted 12 years ago by o0110o
            The marquee will stop when you hover the cursor over it. It will restart when you move the cursor away from it.
        
        
        
            1 
        
        
            1351 
        
                    posted 12 years ago by o0110o
            CSS media queries for common screen sizes which are ignored in older browsers.
        
        
        
            3 
        
        
            1209 
        
                    posted 12 years ago by o0110o
            Want to be able to display the source code of any webpage, with line numbering? Here is a simple code snippet to do it. Just modify the url on line 2 at your convenience. Or even better, make a pretty function according to your needs.
        
        
        
            2 
        
        
            1651 
        
                    posted 13 years ago by o0110o
            If you need to get the whois information for a specific domain, why not using PHP to do it? The following function take a domain name as a parameter, and then display the whois info related to the domain.
        
        
        
            1 
        
        
            1326 
        
                    posted 13 years ago by o0110o
            In order to optimize your scripts, you may definitely want to know how many amount of RAM they use on your server. This snippet will check memory and then print initial, final and peak usages.
        
        
        
            3 
        
        
            1152 
        
                    posted 13 years ago by o0110o
            Get the text in between more text in a string. Accepts $content,$start,$end & $is_string as parameters.
        
        
        
            1 
        
        
            1344 
        
                    posted 13 years ago by o0110o
            Set the desired date within the function. 
Make some images and label them "1.jpg, 2.jpg, 3.jpg, etc...".
That's how it's done.
        
        
        
            1 
        
        
            2366 
        
                    posted 13 years ago by o0110o
            This function will force a file to be downloaded. It accepts $_path as a parameter.
        
        
        
            1 
        
        
            2462 
        
                    posted 13 years ago by o0110o
            This function performs several checks to make sure it's getting the correct IP address.
        
        
        
            1 
        
        
            2780 
        
                    posted 13 years ago by o0110o
            A handy function to get the contents of a file with curl. Accepts $_path as a parameter.
        
        
        
            1 
        
        
            2669 
        
                    posted 13 years ago by o0110o
            This function will use curl to see if a file exists at the location it's provided. It accepts $_path as a parameter.
        
        
        
            1 
        
        
            2872 
        
                    posted 13 years ago by o0110o
            A function to get a files size via curl. Accepts $_path, $_unit, $_float, $_username & $_password; In the listed order.
        
        
        
            1 
        
        
            2890 
        
                    posted 13 years ago by o0110o
            This is a function to retrieve the mime-type of a file by checking the header response with curl. It accepts the file-path as a parameter & it also has a fallback for empty returns.
        
        
        
            1 
        
        
            3365 
        
                    posted 13 years ago by o0110o