Skip to content

Instantly share code, notes, and snippets.

mabel

Block or report user

Report or block mabel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View telegraf.js
#!/usr/bin/node
const {tg_token, ws_token, ws_port, http_port} = require('../etc/credentials.js')
const Telegraf = require('telegraf')
const bot = new Telegraf(tg_token)
const Telegram = require('telegraf/telegram')
const tg = new Telegram(tg_token)
const WebSocket = require('ws')
const wss = new WebSocket.Server({port: ws_port})
const wsc = new WebSocket('ws://localhost:3501/admin', {headers: {token: ws_token}})
View gulpfile.js
var gulp = require('gulp')
var pug = require('gulp-pug')
var stylus = require('gulp-stylus')
var coffee = require('gulp-coffee')
gulp.task('css', function() {
gulp.src('index.styl')
.pipe(stylus())
.pipe(gulp.dest('../public/css'))
})
View gulpfile.js
var gulp = require('gulp')
var pug = require('gulp-pug')
var stylus = require('gulp-stylus')
var coffee = require('gulp-coffee')
gulp.task('css', function() {
gulp.src('index.styl')
.pipe(stylus())
.pipe(gulp.dest('../public/css'))
})
@mabel
mabel / server.js
Created Apr 10, 2018
Simpliest http-server via NodeJS
View server.js
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(3000);
console.log('Server running at http://localhost:3000/');
@mabel
mabel / README.md
Last active Sep 25, 2017
Переменные в JavaScript
View README.md

Hello World!

You can’t perform that action at this time.