Photo Montage
Posted on June 25th, 2014 by webninjataylor
Posted on June 25th, 2014 by webninjataylor
Posted on June 25th, 2014 by webninjataylor
Posted on June 25th, 2014 by webninjataylor
Posted on June 25th, 2014 by webninjataylor
<div class=”animateable”></div> /******** SCALE ********/ .animateable { … animation: inout 2s; -webkit-animation: inout 2s; animation-iteration-count: 1; -webkit-animation-iteration-count: 1; } @keyframes inout { 0% { transform: scale(0, 0); } 50% { transform: scale(2, 2); } 100% { transform: scale(1, 1); } } @-webkit-keyframes inout { /* Safari & Chrome */ 0% { -webkit-transform: scale(0, 0); } […]
Posted on June 25th, 2014 by webninjataylor
<div id=”bigvid”> <video id=”big-video-vid_html5_api” class=”vjs-tech” preload=”auto” data-setup=”{}” webkit-playsinline=”” autoplay=”autoplay” src=”http://barrelny.com/recap/2012/wp-content/themes/barrel-portfolio/im/office_small.mp4″ loop></video> </div> #bigvid { position: absolute; background-color: #000; height: 100%; width: 100%; }
Posted on June 25th, 2014 by webninjataylor
Animating with CSS can be as simple as using transform and/or transition on elements and setting the final animation state via a pseudo-class like :hover… … #text { … top:200px; … opacity: 0; -webkit-transition: all 2s linear; -moz-transition: all 2s linear; } #photo { opacity: 0.25; -webkit-transform: scale(1.5) translate3D(0, 0, 0); -webkit-transition: all 5s linear; […]
Posted on June 25th, 2014 by webninjataylor
<iframe src=”http://jsfiddle.net/USERNAME/FIDDLE/embedded/result,resources,html,css,js” width=”100%” height=”300″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Posted on June 24th, 2014 by webninjataylor
Switch is an abbreviated version of if, else if, etc… <?php switch($_POST[‘color’]) { case ‘white’: case ‘black’: $clean[‘color’] = $_POST[‘color’]; break; } ?>
Posted on June 24th, 2014 by webninjataylor
<?php //Initialize an empty array for storing filtered, escaped input $clean = array(); //Wash Basic Input Fields function washnormal(){ //Use the global $clean array global $clean; //Loop through the fields passed to the function for ($i = 0; $i < func_num_args(); $i++){ $item = func_get_arg($i); //Regular expression matching for lowercase letters, uppercase letters, digits, periods, […]
Posted on June 24th, 2014 by webninjataylor
You should store include files outside of the document root for security.
Posted on June 24th, 2014 by webninjataylor
Clear a variable’s value(s) <?php unset($variable); ?> Clear a long record set to free memory. Only needs to be called if you are concerned about how much memory is being used for queries that return large result sets. All associated result memory is automatically freed at the end of the script’s execution. <?php mysql_free_result($rsXYZ); ?>
Posted on June 24th, 2014 by webninjataylor
<?php //Associative multidimensional array with named keys, called in reverse order to avoid returning NULL $menuTests = array( ‘ALMA’ => ‘/index.php/about/facilities/alma’, ‘EVLA’ => ‘/index.php/about/facilities/vlaevla’, ‘SKA’ => ‘/index.php/about/facilities/ska’, ); $menu = array( ‘Home’ => ‘/index.php’, ‘Tests’ => array(‘/cosmicradio/test.php’,$menuTests), ‘Cosmic Radio’ => ‘/cosmicradio/index.php’ ); echo “<pre>”; var_dump($menu); echo “</pre>”; echo $menu[‘Tests’][1]; foreach($menu as $itemPrimary => $urlPrimary){ echo […]
Posted on June 24th, 2014 by webninjataylor
Create database with tables (at least 2 with 1 being for users) Create a user with limited privledges to the database Create a connection file using the new user Use the following on the main public page to ensure no sessions are currently active //CALL SESSION AND DESTROY session_start(); unset($_SESSION); session_destroy(); Create a loginfailed page […]
Posted on June 24th, 2014 by webninjataylor
Sublime Text 2 Xcode Install and launch XCode from the App Store Press ⌘ + , to open the preferences pane Click the Downloads tab and then the install button next to “Command Line Tools” Git (https://help.github.com/articles/set-up-git) PIP sudo easy_install pip Node Fabric sudo pip install fabric Dropbox ImageOptim Jing MAMP Spectacle Photoshop VirtualBox PhoneGap
Posted on June 24th, 2014 by webninjataylor
JSON property keys are always in quotes, but not in JS XHR = XML HTTP Request CFM = Control Flow Management (ex. page loading and data loading asynchronously) $.ajax({ url: ”, data: {‘myUrlParams’: ‘value’}, success: function(){…}, error: function(){…}, dataType: ‘json’ // use jsonp for cross-domain });
Posted on June 24th, 2014 by webninjataylor
if($tabs.length !== $contents.length) throw new Error(‘ERROR TEXT’);
Posted on June 24th, 2014 by webninjataylor
$.fn.makeTabsFor = function(){…}; // Create method $(tabs).makeTabsFor(content); // Call method $.fn.makeTabsFor(content); // Call method when no selector is used When your plugin code gets called, it’s called in the context of the selected jQuery object, so the method “this” becomes the jQuery object itself.
Posted on June 24th, 2014 by webninjataylor
Animations initiated by the user should be quick while animations initiated by the website can be slower to draw attention Animations create ‘eye-light’ and affordance for a website Use the jQuery easings plugin (or jQuery UI) since jQuery only comes with swing and linear A common configuration of the method’s arguments is… The hash (aka object or properties […]
Posted on June 24th, 2014 by webninjataylor
Customizations Tiny MCE Plugin extended valid elements ul[id|class|style], li[id|class|style], script[type|src], img[id|name|src|alt|width|height|border|align|style|class], form[name|id|method|action|onsubmit], input[name|id|type|value|style], textarea[name|id|cols|rows|class|style], a[href|id|class|style|onmouseover|onmouseout], embed[width|height|name|src|type|class|style], iframe[id|src|width|height|style|scrolling], span[id|class|style], div[name|id|class|style] Remove Table layout for true CSS contentpaneopen TABLE = components\com_content\views\article\tmpl\default.php(54) Joomla Issues Search Engine Friendly URLs in Joomla cause image on section pages not to show, but need for home images and login page …so section […]
Posted on June 24th, 2014 by webninjataylor
Here’s a list I’ve compiled from interviews and articles of core JavaScript knowledge for 2014… Event delegation and bubbling Prototypes and inheritance Functions are first-class objects Modular JavaScript Constructor-based approach vs. mixins How to control “this” through bind, apply, and call Async code and how to manage it through things like promises and queues Code testing […]
Posted on June 23rd, 2014 by webninjataylor
Add this to functions.php for JS and CSS. Check out the WordPress Codex for available parameters and info on using the ‘$’ namespace for jQuery. <?php function wnt_styles(){ // STYLES wp_register_style(‘bootstrapcss’, get_template_directory_uri() . ‘/css/bootstrap.css’, array(), ‘20140529’, ‘all’ ); wp_enqueue_style(‘bootstrapcss’); } add_action(‘wp_enqueue_scripts’, ‘wnt_styles’); wp_enqueue_script(‘jquery’); // This is all that’s needed for jQuery since WordPress already has […]
Posted on June 23rd, 2014 by webninjataylor
Use child themes to avoid losing changes when themes are updated by their vendors. Create a new theme folder with the same name as its parent, plus “-child” appended to it Create a style.css file with at least the following three required lines… Theme Name (ex.Theme Name: Twenty Fourteen Child) … NOTE: No spaces allowed […]
Posted on June 23rd, 2014 by webninjataylor
<?php echo do_shortcode(“[shortcode]”); ?>
Posted on June 23rd, 2014 by webninjataylor
Tips You can add scripts to page layouts after a snippet’s <div></div>, but not within the snippet in the layout file Bootstrap JS files conflict with SP core; edits won’t save in browser HTML for SharePoint Ingestion No <form> tags No <style> tags Use ms-design-css-conversion=”no” in the CSS <link> tag if using web fonts SP […]
Posted on June 23rd, 2014 by webninjataylor
SELECT * FROM local_page WHERE page_hotel_address REGEXP “\r\n”;