
CSS3 PIE: CSS3 decorations for IE Rails Assertions Cheat Sheet Last week I was working on the Rails testing book and I started wondering how the rest of the Rails world was writing their tests. Since I decided that I was going to use Test::Unit instead of Rspec in the book, I knew that I could safely limit my search to just assertions and refutions. The first thing I did was identify every method available to ActiveSupport::TestCase that starts with assert or refute. Once I had that list of 55 methods, I searched through github for instances of that method in files that end in ‘.rb’ nested in a test directory. The results were impressive. There were 1,449,068 assertions and refutions in Ruby projects. Assertions: Refutions: Hi. I've been building things with Rails for three years, and trying to figure out how to test for almost as long.
caolan/async IE Alert js - let your visitors upgrade their browser What is IE Alert ? IE Alert is a jQuery plugin that shows a well designed modal box to the visitor who's trying to view your site with an older version of Internet Explorer browser, this modal box encourages your visitors to upgrade their browser for a better experience using your site. When should I use it? You should use it when you created a stunning modern website that looks and works amazing in modern browsers and you don't want to waste your time and money to make it work on legacy browsers like IE6, IE7 and IE8. Usage 1. There are more options available, see the docs.
visionmedia/git-extras Magnific Popup: Responsive jQuery Lightbox Plugin Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device(for jQuery or Zepto.js). Examples Single image lightbox Three simple popups with different scaling settings. 1 — fits horizontally and vertically, 2 — only horizontally, 3 — no gaps, zoom animation, close icon in top-right corner. Lightbox gallery You may put any HTML content in each gallery item and mix content types. Zoom-gallery If you wish to open the popup only after image is fully loaded, you may preload image via JS. Popup with video or map In this example lightboxes are automatically disabled on small screen size and default behavior of link is triggered. Dialog with CSS animation Animations are added with simple CSS transitions, you can make them look however you wish.More animation effects on CodePen. Popup with form Entered data is not lost if you open and close the popup or if you go to another page and then press back browser button. Ajax popup Fast
ImagesLoaded JavaScript is all like "You images done yet or what?" imagesloaded.desandro.com Detect when images have been loaded. Demo Edit this example on CodePen or try the jQuery example. Just to keep things interesting, there’s a 10% chance of adding a broken image. Install Get a packaged source file: Or install via Bower: bower install imagesloaded Or install via Component: component install desandro/imagesloaded Usage imagesLoaded( elem, callback ) new imagesLoaded( elem, callback ) elem Element, NodeList, Array, or Selector Stringcallback Function - function triggered after all images have been loaded Using a callback function is the same as binding it to the always event (see below). imagesLoaded( document.querySelector('#container'), function( instance ) { console.log('all images are loaded'); }); imagesLoaded( '#container', function() {...}); var posts = document.querySelectorAll('.post'); imagesLoaded( posts, function() { Events imagesLoaded is an Event Emitter. always done fail progress Properties jQuery
Grunt: Automated Testing With a look into our evolving JavaScript testing methods, Patrick shares how we're using Mocha, Jasmine, and Grunt. Introduction A few months ago we posted about our new build process, and we mentioned starting to use Grunt for the “freedom and customization” that it provided. Recently, Rob Tarr released a new application called Stuntman. Grunt to the Rescue Running both server and client-side JavaScript specs was an issue. Our solution: Test client side JavaScript with Jasmine Test our server side JavaScript with Mocha Not very challenging to do thanks to Grunt, but there are some important packages you will need. Prerequisites Grunt Setup Check out the example repository. Our basic setup consists of the following packages in our package.json file: Example “package.json” Gruntfile.js Setup Once you have your package.json and Gruntfile.js in a directory, install the packages with the following command (in your project directory): npm install Directory Structure Example Tests Client Server Running Tests
jReject - jQuery Plugin for Simple Browser Rejection S.A.R.A.H. L’objectif du Projet S.A.R.A.H est d’avoir une maison intelligente connectée à l’internet des objets un peu dans l’esprit de la série TV Eureka. Le principe est de déclencher des requêtes HTTP via: la reconnaissance vocale de phrases exprimées en XMLla reconnaissance de gestes exprimés en XMLla reconnaissance faciale (machine puissante !)une planification Google Calendarla reconnaissance de QRCodesdes scripts joués périodiquements, … Ces requêtes HTTP déclenchent des scripts NodeJS pour interagir avec les boîtiers domotiques, le karotz ou simplement aller chercher de l’information sur internet (scraping): horaires de cinéma, météo, horaires de bus, … ParisWeb 2013 Le framework La configuration de ces actions est simple (XML et JavaScript) et modulaire (plugins). Communauté L’article de Jérôme VEYRET. L’article de Jérôme VEYRET. Aussi en vidéo: Installation Le framework est générique ! Télécharger le zip v3.1.4(statistiques) Documentation v3.1.3 (stats) – v3.1.0 (stats) – v2.9.5 (stats) Architecture
CSS Sprites: What They Are, Why They're Cool, and How To Use Them By Chris Coyier On This article has been revised and re-written several times since its very first publication in 2007, to keep the information current. The most recent revision was done by Flip Stewart in January 2015. #What are CSS Sprites? Spoiler alert: they aren't fairies that write your stylesheets for you. To summarize: the term "sprites" comes from a technique in computer graphics, most often used in video games. CSS Sprites is pretty much the exact same theory: get the image once, and shift it around and only display parts of it. #Why use CSS Sprites? It may seem counterintuitive to cram smaller images into a larger image. Let's look at some numbers on an actual example: That adds up to a total of 14.38KB to load the three images. While the total image size (sometimes) goes up with sprites, several images are loaded with a single HTTP request. Thus, sprites are important for the same reasons that minifying and concatinating CSS and JavaScript are important. $ npm install sprity -g
SpriteMe Offline.js – Handle your users losing their internet connection like a pro What is Offline.js? Offline.js is a library to automatically alert your users when they've lost internet connectivity, like Gmail. It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. It has a number of beautiful themes and requires no configuration. Install The easiest way to add Offline to your site is with Eager. Click Install to see a live preview of Offline on your website. Download Offline.js Pick a Theme Indicator Themes Submit a theme! Documentation HubSpot
Bitcoin, Litecoin : montez votre propre mineur ! : Composants informatique