This file contains hidden or 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 uploadingPhotos = ReactiveVar(); // upload indicator | |
Template.portfolioPhoto.helpers({ | |
uploading: function() { return uploadingPhotos.get(); }, | |
moreThanOne: function() { return uploadingPhotos.get() > 1 ? true : false; } | |
}); | |
function uploadFiles(files, profileId) { | |
_.each(files, function(file) { |
This file contains hidden or 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 transliterate = ( | |
function() { | |
var | |
rus = "щ ш ч ц ю я ё ж ъ ы э а б в г д е з и й к л м н о п р с т у ф х ь і ї є ґ".split(/ +/g), | |
eng = "shh sh ch cz yu ya yo zh ' y e a b v g d e z i j k l m n o p r s t u f x ` i yi e g".split(/ +/g); | |
return function(text, engToRus) { | |
if (!text) | |
return ""; | |
var x; |
This file contains hidden or 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
/* | |
Convert mongo collection data to select2 data array that support children (nested) | |
I use it for convert Meteor collection to select2 data | |
Example: | |
data = [ {_id: 1, name: "foo1"}, | |
{_id: 2, name: "child 1 of foo1", p: 1} | |
{_id: 3, name: "child 2 of foo1", p: 1} |
This file contains hidden or 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
#!/bin/bash | |
USERNAME="<username>" | |
PASSWORD="<password>" | |
DBNAME="<mongo db mae>" | |
# export dump pattern | |
FILE_NAME="mongo-dump" | |
# scp save directory | |
REMOTEDIR="[email protected]:" |
This file contains hidden or 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
'use strict'; | |
angular.module('app') | |
/* | |
* Next service used to make more readable url | |
* | |
* Example: | |
* | |
* $stateProvider | |
* .state('searchfilter', { | |
* url: '/searchfilter{filter:string}', // not :any, but :string type |
This file contains hidden or 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
! Add into you #include ".Xdefaults-pub" | |
urxvt.geometry: 120x45 | |
! Bind C-0, C-+ and C-= to activate medium, big and small font size respectively. | |
urxvt.font: xft:DejaVu Sans Mono | |
urxvt.font1: xft:Kozuka Gothic Pr6N | |
urxvt.keysym.C-0: command:\033]710;xft:DejaVu Sans Mono\007 | |
urxvt.keysym.C-minus: command:\033]710;xft:DejaVu Sans Mono-7\007 | |
urxvt.keysym.C-equal: command:\033]710;xft:DejaVu Sans Mono-16\007 |
This file contains hidden or 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
updateTC(); | |
$scope.$watch('$translateLoadingEnd', defferedUpdateTC); | |
function updateTC(arg) { | |
$translate('frontend.links.terms_and_conditions').then(function(termsText) { | |
// state to terms | |
var href = $state.href('app.terms-and-conditions', {lang: $rootScope.currentLocale}), | |
urledTerms = '<a href="'+ href +'">' + termsText + '</a>'; |
This file contains hidden or 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
# Prevent default drop behavior (loading a file) outside of the drop zone | |
window.addEventListener 'dragover', ((e) -> e.preventDefault()), false | |
window.addEventListener 'drop', ((e) -> e.preventDefault()), false |
This file contains hidden or 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 paypal = new PaypalSDK(); | |
Meteor.startup(function ObservePaypalSettings() { | |
/* | |
var paypalSchema = new SimpleSchema({ | |
enable: { | |
type: Boolean, | |
defaultValue: false, | |
}, | |
isSandBox: { |
This file contains hidden or 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
// ISO_3166 language map. http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html | |
var LANGUAGES = { | |
en: 'en', | |
ru: 'ru', | |
sv: 'si', | |
fi: 'fi', | |
tr: 'tr', | |
el: 'gr' | |
}; |
OlderNewer