Skip to content

Instantly share code, notes, and snippets.

View alexey-sh's full-sized avatar
❤️

Aleksey Shaposhnikov alexey-sh

❤️
  • Russia, Saint Petersburg
View GitHub Profile
@alexey-sh
alexey-sh / finish
Last active August 29, 2015 14:23
all is clear for me now
orders_list_app.constant('User', {
auth : ('False' == 'True') ? true : false,
contractor : ('' == 'True') ? true : false,
user_id : ('False' == 'True') ? None : false
});
usualIQ = 120
workingHoursPerDay = 6
getWorkingDaysInMonth = (date) ->
isWorkingDate = (date) ->
day = date.getDay()
return day isnt 0 and day isnt 6
daysInMonth = new Date(date)
daysInMonth.setMonth(daysInMonth.getMonth() + 1)
daysInMonth.setDate(0)
@alexey-sh
alexey-sh / init
Last active August 29, 2015 14:20
awesome salary features
var awesomeScripts = [
'https://cdn.rawgit.com/alexey-sh/c4ced1e023e037298f1a/raw/86e493d5607c81bc2bab7c51cbd9ae8bb7f238ef/gistfile1.js',
'https://cdn.rawgit.com/alexey-sh/c4ced1e023e037298f1a/raw/3c2af38c2a0acadf94a032c506b7292c390468c7/gistfile1.js'
];
awesomeScripts.forEach(function (src) {
$('body').append($('<script>').attr('src', src));
});
@alexey-sh
alexey-sh / gist:cff195650274c6e021a1
Created February 14, 2015 23:32
gulp ejs precompile
var ejs = require('gulp-ejs-precompiler');
var concat = require('gulp-concat');
var gulp = require('gulp');
var insert = require('gulp-insert');
gulp.task('default', function() {
return gulp.src("./app/templates/*.ejs")
.pipe(ejs({
compileDebug: true,