Profile
Achievement
 
                     
    
                brandonjp's Recent Snippets
- All /
Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out
        
        
        
            1 
        
        
            3661 
        
                    posted 9 years ago by brandonjp
            // create a variable to toggle debugging
  // to use it, just call debug(with,any,optional,parameters)
  debug(x,y,z);
  // it will try to guess what type of message to log, or you can specify in the first parameter
  debug("error",x,y,z);
        
        
        
            1 
        
        
            3554 
        
                    posted 10 years ago by brandonjp
            thanks to... 
http://gskinner.com/RegExr/
http://daringfireball.net/2010/07/improved_regex_for_matching_urls
        
        
        
            1 
        
        
            4955 
        
                    posted 12 years ago by brandonjp
            
            AppleScript
        
            Applescript - check if a menu item exists, if so click on it, then cmd+tab back to previous app  
        
                    
        
        
        
            0 
        
        
            4626 
        
                    posted 14 years ago by brandonjp
            
Stolen from  stetho -- All thanks to him  --   Now, about your folder actions… http://bit.ly/fW9ExM
        
        
        
            0 
        
        
            1501 
        
                    posted 14 years ago by brandonjp
            Stolen from  stetho -- All thanks to AppleScript to convert CMYK to RGB values http://bit.ly/eP2mXS
        
        
        
            0 
        
        
            1578 
        
                    posted 14 years ago by brandonjp
            
            JavaScript
        
            JS - onclick function to insert text characters symbol into text input field or textarea at the cursor caret location position  
        
                    // big thanks to these tips for giving me code to steal:  http://bit.ly/bundles/brandonjp/9
/*
 * USAGE:  give your HTML textarea or text input element an ID
 * give your button an onClick="insertThisInThere(text2insert, theInputIDwhereItGoes);"...
        
        
        
            0 
        
        
            3717 
        
                    posted 14 years ago by brandonjp
            Data Types for DB, MySQL, SQLite, PHP, Ruby, Rails, JS, etc. because I forget them sometimes
from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0
from Rails Migrations http://bit.ly/hI5zpz
        
        
        
            0 
        
        
            1533 
        
                    posted 14 years ago by brandonjp
            
            Ruby
        
            Ruby / Rails - A refresher reference for me because I forget... create project generate scaffold scaffolding migrate db  
        
                    Ruby / Rails - A refresher reference for me because I forget how to do this... create project generate scaffold scaffolding migrate db start server
        
        
        
            0 
        
        
            1749 
        
                    posted 14 years ago by brandonjp
            links (full <a href="#"> element) to Show Edit Destroy Delete records in view *.erb 
must be in the record loop:
        
        
        
            0 
        
        
            2836 
        
                    posted 14 years ago by brandonjp
            
            HTML
        
            Meta Tag - Auto Refresh in html doc page header to preview in IE FF all browsers while working coding  
        
                    
        
        
        
            0 
        
        
            2244 
        
                    posted 15 years ago by brandonjp
            
            CSS
        
            CSS - CSS3 Safari style toolbar buttons rounded box shadow pressed border radius for Moz, Firefox, KHTML  
        
                    
        
        
        
            1 
        
        
            1494 
        
                    posted 15 years ago by brandonjp
            
            jQuery
        
            jQuery dynamic loader - load jquery using pure js javascript if jQ is undefined or does not exist  
        
                    
        
        
        
            0 
        
        
            1547 
        
                    posted 15 years ago by brandonjp
            
            jQuery
        
            js javascript browser language detection, get the user\'s browser\'s language preference setting using jquery to detect users br  
        
                    JQ - detect users browser language using http headers via ajax jsonp ajaxhttpheaders
        
        
        
            1 
        
        
            3814 
        
                    posted 15 years ago by brandonjp