- Install jsgrep
- Convert your source code using
node spatch-cli.js es5-to-es3.spatch source.js // yields the converted source
- Prepare the implementation of ES5 by implemeting the missing polyfills in es5.js
- Concat es5.js and the converted code
- Wrap the result of the previous steps in a closure and export your object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
public function testProtected() | |
{ | |
$dateFormatter = new DateFormatter; | |
$class = new \ReflectionClass('DateFormatter'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sass" | |
# this just simplifies css comparison | |
class String | |
def format_css | |
self.strip.split(/\n/).select { |line| line.strip!; !line.empty? }.join('\n') | |
end | |
end | |
describe "Sass to CSS" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Freckle | |
module Date | |
class << self | |
def parse(string) | |
raw = string.to_s.strip | |
return nil if raw.empty? | |
begin | |
# reverse order if we encounter "European" formatting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$base-font-size: 125%; | |
@mixin rem-font-size($sizeValue: 1){ | |
font-size: ($sizeValue * (16 * ($base-font-size / 100))) + px; | |
font-size: $sizeValue + rem; | |
} | |
@mixin rem-margin-bottom($sizeValue: 1){ | |
margin-bottom: ($sizeValue * (16 * ($base-font-size / 100))) + px; | |
margin-bottom: $sizeValue + rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%myclass { | |
color: blue; | |
@media (min-width: 600px) { | |
background: red; | |
} | |
@media (min-width: 800px) { | |
font-size: 28px; | |
} | |
} |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Node.js - Require.js Build Script | |
// To run the build type the following: node app.build.js | |
// Loads the Require.js Optimizer | |
var requirejs = require('../public/js/libs/r.js'); | |
// Sets up the basic configuration | |
var baseConfig = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Sascha Depold http://depold.com | |
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 |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: