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
| launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist | |
| launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist | |
| sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist | |
| sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist |
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
| { | |
| 'key_name': ["С момента входа ", ["прошёл", "прошло", "прошло"], " ", "$count", " ", ["час", "часа", "часов"]], | |
| // ... | |
| } |
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
| // Full example code see here - https://github.com/derzunov/redux-react-i18n/tree/master/example | |
| import { i18nActions, i18nReducer, Loc } from 'redux-react-i18n'; | |
| //... | |
| // Code Code Code ... | |
| //... | |
| store.dispatch( i18nActions.setLanguages( | |
| [ | |
| { |
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
| { | |
| 'key_simple': 'Дайте, пожалуйста, два билета в вагон второго класса в Варшаву.', | |
| 'key_with_plurals': [["Остался", "Осталось", "Осталось"], " ", "$count", " ", ["час", "часа", "часов"]], | |
| 'key_simple_with_number': 'Просто число после двоеточия: $Count' | |
| } |
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
| { | |
| 'key_simple': 'Prosze, dwa bilety drugiej klasy do Warszawy.', | |
| 'key_with_plurals': [["Pozostała", "Pozostały", "Pozostało"], " ", "$count", " ", ["godzina", "godziny", "godzin"]], | |
| 'key_simple_with_number': 'Numer: $Count' | |
| } |
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 passport = require( 'passport' ); | |
| module.exports = { | |
| facebook: function( req, res, next ) { | |
| return passport.authenticate('facebook', { | |
| scope: ['email'] | |
| })( req, res, next ); | |
| }, | |
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
| module.exports.http = { | |
| middleware: { | |
| passportInit : require('passport').initialize(), | |
| passportSession : require('passport').session(), | |
| order: [ | |
| 'startRequestTimer', | |
| 'cookieParser', | |
| 'session', |
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
| module.exports = { | |
| attributes: { | |
| name: { | |
| type: 'string', | |
| minLength: 42 | |
| } | |
| /* | |
| и другие атрибуты и attribute/instance методы... | |
| */ |
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 passport = require( 'passport' ), | |
| FacebookStrategy = require( 'passport-facebook' ).Strategy; | |
| passport.use( new FacebookStrategy({ | |
| clientID: YOUR_CLIENT_ID, // Получить тут - https://developers.facebook.com/ | |
| clientSecret: YOUR_CLIENT_SECRET, // Получить тут - https://developers.facebook.com/ | |
| callbackURL: "/auth/callback", // Наш урл коллбэка в контроллере AuthController | |
| enableProof: false, | |
| profileFields: ['id', 'email', 'name'] // Поля, которые мы хотим получить у пользователя facebook | |
| }, |
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
| link = "https://www.youtube.com/watch?v=Imeq3GeRttw" | |
| link2 = "http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0" | |
| link3 = "http://www.youtube.com/watch?v=EqS7oJcBi7w#t=0m10s" | |
| youtube_parser = ( url ) -> | |
| regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/ | |
| match = url.match regExp | |
| if match and match[7].length == 11 then match[7] else false | |
| console.log youtube_parser( link ), youtube_parser( link2 ), youtube_parser( link3 ) |
NewerOlder