Все занятия теперь находятся в репозитории rodchenko/lessons вместе с примерами.
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 login = require('facebook-chat-api') | |
var config = require('./config.json') | |
var request = require('request') | |
var fs = require('fs') | |
var Jimp = require('jimp') | |
var download = function (uri, filename, callback) { | |
request.head(uri, function (err, res, body) { | |
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback) | |
}) |
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
{ | |
"password": "your_password", | |
"login": "your_login" | |
} |
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 login = require('facebook-chat-api') | |
var config = require('./config.json') | |
var util = require('util') | |
var loginPromise = util.promisify(login) | |
var setup = async function () { | |
var bot1 = await loginPromise({email: config.bot1.login, password: config.bot1.password}) | |
var bot2 = await loginPromise({email: config.bot2.login, password: config.bot2.password1}) | |
bot1.listen((err, message) => { | |
console.log('message', message) |
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
const fetch = require('isomorphic-fetch') | |
const build = require('redux-object').default | |
const normalize = require('json-api-normalizer').default | |
const apiHost = 'https://dev.api.garagemca.org' | |
const apiEndpoint = '/document/' | |
const bookId = 'fff0840c-21da-4764-a91f-401548acebcc' | |
// the function | |
const filterPeople = (relations, type) => { |
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
const alphabet = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя"; | |
const factors = [[38,1,4,4], [9,2,2,5], [36,3,8], [0,7,14], [38,1,1]]; | |
export default ЛСДУ3ЙФЯУ9 = (name) => { | |
// check | |
if(typeof name !== 'string') return console.error('name is not a string'); | |
if(name.length > 19) return console.error('name is longer then possible'); |
Курс 2016 года: введение в веб программирование для художников через conversational interfaces (CI) и связь с предыдущими пройденными материалами (arduino, max msp). Часть курса "технические основы" в Школе Фотографии и Мультимедиа имени Родченко.
Список занятий:
- Вводное: подготовка окружения, командная строка, введение в meteor.js
- Простейший бот, что такое API, работа с модулями в node.js
- Сохранение версий программы, совместная работа и публикация кода с помощью git
- Работа с сохраниением данных: insert, update, find, fetch. Демострация данных
- Что такое NAT, какие бывают сервера, что такое ssh, ассинхронные ключи, деплой приложения