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
.example:lang(ru) { | |
/* styles for ru locale */ | |
} |
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 uniqEs6 = (arrArg) => { | |
return arrArg.filter ( (elem, pos, arr) => arr.indexOf (elem) == pos) | |
} | |
// или | |
const uniqEs6 = (array) => [ ...new Set (array) ] |
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
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys' |
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
defaults write com.apple.dock persistent-apps -array-add '{tile-data={};tile-type="spacer-tile";}'; killall Dock |
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 map; | |
var mode; | |
var address; | |
var coords; | |
function initMap() { | |
setTimeout(function(){ | |
var directionsService = new google.maps.DirectionsService; | |
var directionsDisplay = new google.maps.DirectionsRenderer; | |
var customMapType = new google.maps.StyledMapType([ |
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
// ES6 | |
class Tweet { | |
constructor (doc) { | |
_.extend(this, doc); | |
} | |
} | |
Tweets = new Mongo.Collection('tweets', { | |
transform (doc) { | |
return new Tweet(doc); |
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
// Edit /etc/default/locale | |
LANG="en_US.UTF-8" | |
LANGUAGE="en_US" | |
LC_ALL="en_US.UTF-8" |
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
cd ~/bundle/programs/server/npm | |
rm -rf npm-bcrypt/node_modules/bcrypt | |
npm install [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
// in /lib needed on both client and server | |
var throwError = function(error, reason, details) { | |
error = new Meteor.Error(error, reason, details); | |
if (Meteor.isClient) { | |
return error; | |
} else if (Meteor.isServer) { | |
throw error; | |
} | |
}; |
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 GithubAPI = Meteor.require('github'); | |
var ghapi = new GithubAPI({version: "3.0.0"}); | |
function getUserProfile(req, callback) { | |
ghapi.user.getFrom(req, callback); | |
} | |
var wrappedGetProfile = Meteor._wrapAsync(getUserProfile); | |
Meteor.methods({ |