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
class Fixnum | |
define_method :+ do |i| | |
rand(100) == 42 ? 42 : i - -self | |
end | |
end |
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
class Fixnum | |
def random_number_between_oneAndTEN!(yaSuRE) | |
if yaSuRE == 'ya dude!' | |
return rand(10) | |
else | |
raise 'YA GATTA TYPE YA DUDE!!!!!!!' | |
end | |
end | |
end |
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
mkdir mynewapp | |
cd mynewapp | |
echo "{}" > package.json | |
npm install --global gulp | |
npm install --save-dev gulp | |
npm install --save-dev gulp-less |
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
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
gulp.task('less', function() { | |
return gulp.src('css/app.less') | |
.pipe(less()) | |
.pipe(gulp.dest('dist')); | |
}); |
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
@color-base: #2d5e8b; | |
.class1 { | |
background-color: @color-base; | |
} | |
.class2 { | |
background-color: #fff; | |
color: @color-base; | |
} | |
.class3 { |
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
.class1 { | |
background-color: #2d5e8b; | |
} | |
.class2 { | |
background-color: #fff; | |
color: #2d5e8b; | |
} | |
.class3 { | |
border: 1px solid #2d5e8b; | |
} |
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
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
gulp.task('less', function() { | |
return gulp.src('css/app.less') | |
.pipe(less()) | |
.pipe(gulp.dest('dist')); | |
}); | |
gulp.task('watch', ['less'], function() { |
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
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
var concat = require('gulp-concat'); | |
gulp.task('less', function() { | |
return gulp.src('css/app.less') | |
.pipe(less()) | |
.pipe(gulp.dest('dist')); | |
}); |
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
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var concat = require('gulp-concat'); | |
var ngmin = require('gulp-ngmin'); | |
gulp.task('scripts', function() { | |
return gulp.src(['src/**/module.js', 'src/**/*.js']) | |
.pipe(concat('app.js')) | |
.pipe(ngmin()) | |
.pipe(uglify()) |
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
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
gulp.task('less', function() { | |
return gulp.src('css/app.less') | |
.pipe(less({compress: true})) | |
.pipe(gulp.dest('dist')); | |
}); |
OlderNewer