Start with:
FORMAT: 1A
@echo off | |
rem If Windows's idea of $HOME is wrong for you, you can use | |
rem Console2 and instead of using bash directly, use this batch | |
rem file instead. It will set $HOME to wherever it is located. | |
set PATH=%PATH%;%~dp0 | |
set HOME=%~dp0 | |
rem adjust path to suit |
/* | |
* requireTime.js | |
* | |
* require()s every thing in your node_modules and tells you how long each one | |
* took. | |
* | |
* USAGE: | |
* $ cd your_project_folder | |
* $ node loadTest.js | |
* |
If you're using Browserify and Reactify to write React components and build them for the browser, you may, depending on your setup, see errors along the lines of "unexpected token <", which means that your code is not getting Reactified properly. You will either see this in Gulp, because some subsequent step in the pipeline can't parse your code, or in the browser.
Here's how browserify decides how to apply transforms:
You need to specify reactify
before anything else which is going to want to parse the code, because obvs. it isn't valid es5 until it's been reactified (so e.g. having `["browserify-shim", "reactify"
(defn episode-number [file] | |
(def match (re-matches | |
#"\d{4}-\d{2}-\d{2} - (S\d\d E\d\d) - .*" | |
(.getName file))) | |
(if (= match nil) | |
nil | |
(match 1))) | |
(def episodes (partition-by episode-number files)) |
(function (g) { | |
var v = [], | |
i=0, | |
j=g.jQuery, | |
d=g.$; | |
while (g.jQuery) { | |
v.push(g.jQuery.fn.jquery); | |
g.jQuery.noConflict(true); | |
i++ ; | |
} |
using System.Reflection; | |
private object ExecutePrivateMethod(string name, params object[] args) | |
{ | |
MethodInfo method = | |
GetType().BaseType.GetMethod(name, BindingFlags.NonPublic | BindingFlags.Instance); | |
if (method == null) | |
throw new NotImplementedException("Cannot find method " + name); | |
return method.Invoke(this, args); |
-----BEGIN WEBFACTION INSTALL SCRIPT----- | |
#!/bin/env python2.7 | |
""" | |
Nginx 0.8.54 Installer New | |
"autostart": not applicable | |
"extra info": Enter domain name for the nginx app | |
""" |
// Original: even without reading the code, it looked wrong. Lots of very | |
// obvious repetition. And switches are so often a code smell. | |
switch (modeName) { | |
case "Manual": | |
alert(self.options.messages.pleaseSet + self.options.messages.Manual); | |
break; | |
case "Automatic": | |
alert(self.options.messages.pleaseSet + self.options.messages.Automatic); | |
break; |
public string ZoneDataJSON | |
{ | |
get | |
{ | |
var newCount = 0L; | |
if (EntityInstance.IsNew()) return BlankZoneDataJSON; | |
var members = IoCContainer.Resolve<IZoneService>(). | |
GetImmediateZoneMembers(this.EntityId).ToList<IZoneMember>(). | |
Select(mem => new | |
{ |