Skip to content

Instantly share code, notes, and snippets.

View boo1ean's full-sized avatar
🎯
Focusing

Egor Gumenyuk boo1ean

🎯
Focusing
View GitHub Profile

Join channel

Join to channel using specified identifier. After joining user will remain active in channel until manual leave request

Request

POST /channels/{channel_name}/join

Join channel

Join to channel using specified identifier. After joining user will remain active in channel until manual leave request

Request

POST /channels/{channel_name}/join
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
context: path.join(__dirname, '../frontend'),
entry: [
path.join(__dirname, '../frontend'),
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
@boo1ean
boo1ean / constraints.sql
Last active May 16, 2019 08:39
Disable constraints in postgres
-- As superuser you can connect to the target database
\c best-database
-- Drop specific table triggers
alter table foo disable trigger all;
-- After you dirty work don't forget to reenable triggers
alter table foo enable trigger all;
function compile_scripts (scripts, dest, dist) {
return new Promise(function (resolve, reject) {
gulp.src(scripts)
.pipe(concat(dist))
.pipe(gulp.dest(dest))
.on('error', reject)
.on('end', resolve);
});
}
# ~/.bash_aliases
# Kill all running containers.
alias dockerkill='docker kill $(docker ps -a -q)'
# Delete all stopped containers.
alias dockercleanc='docker rm $(docker ps -a -q)'
# Delete all untagged images.
alias dockercleani='docker rmi $(docker images -q -f dangling=true)'
@boo1ean
boo1ean / app.js
Created September 17, 2014 15:24
var Task = Backbone.Model.extend({
urlRoot: '/tasks',
idAttribute: "_id",
defaults: {
status: 'new'
},
clear: function() {
@boo1ean
boo1ean / 1.js
Created September 17, 2014 10:19
var Q = require('q');
var request = require('request');
var url = 'https://api.github.com/users/boo1ean';
var userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36';
var getInfo = function() {
var deferred = Q.defer();
var opt = {
var t = require('yartf');
var credentials = {
email: 'admin@example.com',
password: 'test'
};
var task = {
title: 'First task'
};
var pollutants = [];
var findPollutant = function(point) {
for (var i in pollutants) {
if (pollutants[i].latitude == point[1] && pollutants[i].longitude == point[0]) {
return i;
}
}
return -1;