Skip to content

Instantly share code, notes, and snippets.

View JonathanZWhite's full-sized avatar
🦁

Jonathan White JonathanZWhite

🦁
View GitHub Profile
class Messenger {
constructor() {
this.bot = new TelegramBot('Your token here', { polling: true });
}
listen() {
this.bot.on('text', this.handleText.bind(this))
}
...
import 'babel-core/polyfill'
import React from 'react'
import { render } from 'react-dom'
import Root from './containers/Root'
import configureStore from './store/configureStore'
const store = configureStore()
render(
<Root store={store} />,
(function() {
'use strict';
ThemeController.$inject = ['$scope', 'User', 'Notifications'];
function ThemeController($scope, User, Notifications) {
var vm = this;
vm.user = {};
vm.saveUser = saveUser;
(function() {
UserModel.$inject = '$resource';
function UserModel($resource) {
var baseUrl = 'api/user/:dest';
var User = {};
var userMethods = $resource(baseUrl, {}, {
get: {
(function() {
'use strict';
ThemeController.$inject = ['$scope', 'Notifications'];
function ThemeController($scope, Notifications) {
$scope.user = {};
$scope.changeTheme = function(theme) {
$scope.user.theme = theme;