Recipe to test your ES6 React components.
$ npm install gulp gulp-util gulp-mocha gulp-istanbul isparta run-sequence babel jsdom
Note: You must name all your files .js
, even if they contains JSX, or istanbul will not instrument them.
<head> | |
<script> | |
if (window.localStorage && window.localStorage._tk_cache) { | |
document.documentElement.classList.add('wf-active'); | |
var script = document.createElement('script'); | |
script.innerHTML = localStorage._tk_cache + ";(function () {var timeout = setTimeout(function () {document.documentElement.classList.remove('wf-active');}, 300); Typekit.load({ async: false, active: function () { clearTimeout(timeout); }});})();"; | |
document.head.appendChild(script); | |
} | |
window._tk_onload = function () { | |
var req = new XMLHttpRequest() |
If you have installed the standalone Command Line Tools for XCode on your Mac (i.e. without having XCode.app installed), some of these tools can get a bit confused due to a couple of oversights on Apple's part in finalising the setup.
Note: all commands below will need to be run from an Administrator account, or by an account with appropriate permission in /etc/sudoers.
Sometime when compiling against the preinstalled Frameworks (e.g. Ruby or Python), various tools will inexplicable fail to find header files that are quite clearly there. This is caused by the fact that no XCode has been selected for the command-line tools. Wait, I hear you cry, I don't have XCode installed! Indeed, but you nonetheless need to select one, and point it somewhere where the command line tools exist, like so
/* | |
Given the following html | |
<nav> | |
<ul> | |
<li class="home"><a>Home</a></li> | |
<li class="about"><a>About</a></li> | |
<li class="blog"><a>Blog</a></li> | |
<li class="contact"><a>Contact</a></li> | |
</ul> | |
</nav> |
using System; | |
using System.Collections.Concurrent; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http.Formatting; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
using RazorEngine; |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Surround these with : e.g. :calling: | |
+1 | |
-1 | |
bulb | |
calling | |
clap | |
cop | |
feet |
// SomePage.aspx.cs (ASPX codebehind) function | |
[System.Web.Services.WebMethod()] | |
[System.Web.Script.Services.ScriptMethod()] | |
public static string GetSomeObjects(string id) | |
{ | |
//TODO: get stuff here | |
} |
/* | |
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02 | |
* I had an idea: could Inception movie be explained by a few javascript closures | |
* and variable resolution scope (just for fun)? | |
* | |
* Activate javascript console =) | |
*/ | |
<script> | |
console.group("inception movie"); |