Skip to content

Instantly share code, notes, and snippets.

Pavel Kostenko poul-kg

  • Life AI
  • Kyrgyzstan
Block or report user

Report or block poul-kg

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
@poul-kg
poul-kg / bot-luis-timezone-offset.js
Created Nov 14, 2018
MS BotFramework LUIS timezoneOffset
View bot-luis-timezone-offset.js
/**
* How to change timestamp in ms botframework on every request to LUIS by the bot
*/
const builder = require('botbuilder');
/**
* Create custom LUIS recognizer which can change timezoneOffset in LUIS URL to another offset if we have
* timezone offset somewhere in the session
*
@poul-kg
poul-kg / valet.conf
Last active Nov 15, 2019
CORS Rules for Laravel Valet Nginx
View valet.conf
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@poul-kg
poul-kg / life-ai-app-privacy-policy
Created May 16, 2017
Life AI App Privacy Policy
View life-ai-app-privacy-policy
# Life AI Privacy Policy
* This is a demo app for testing some concepts
* we do not record user identity
* we need RECORD_AUDIO permission to be able to use voice recognition for entering text in the chat
* user interacts with chat bot
* no data is shared with 3rd parties
* questions user type in the chat UI are recorded and can be used to train/improve Natural Language Classifier we use.
@poul-kg
poul-kg / watson-page-response.twig
Created Dec 1, 2016
Watson Page Response in Twig
View watson-page-response.twig
{% set s3 = 'https://s3-us-west-1.amazonaws.com/neon-global/watson' %}
{% set paragraph1 = "22 CityLink is bringing an innovative approach to building smart cities, starting from the ground-up. At the crossroads of efficiency and sustainability, our state-of-the-art platform provides an environment where people, businesses, and governments can flourish. Our holistic approach combines the power of artificial intelligence and machine learning to tailor and adapt to the needs of each citizen, while providing businesses and governments the information needed to create a world-class experience." %}
{% set paragraph2 = "Welcome to 22 CityLink. The Future of Living." %}
{% set page = {
layout: 'About_Us_Layout',
title: "Who are we?",
text: [paragraph1, paragraph2],
imageUrl: s3 ~ "/ipad-color-city-2.png",
backgroundImageUrl: s3 ~ "/assets/img/img-31.jpg"
View semantic-ui-twig-template.html
<div class="bg">
<div class="bg-img" style="background-image: url({{page.backgroundImageUrl}});"></div>
</div>
<div class="ui two column stackable grid container">
<!-- Text Column -->
<div class="column">
<h1>{{page.title}}</h1>
{% if page.text is iterable %}
{% for paragraph in page.text %}
<p>{{paragraph|raw}}</p>
@poul-kg
poul-kg / teamcity
Created Nov 11, 2015
TeamCity startup script for Ubuntu 14.04 on AWS
View teamcity
#!/bin/sh
# /etc/init.d/teamcity
# This will start TeamCity & Default build agent on system startup as ubuntu user
# To run it on every system startup, execute:
# sudo update-rc.d teamcity defaults
case "$1" in
start)
echo "Starting TeamCity"
start-stop-daemon --start --chuid ubuntu:ubuntu --quiet --exec /home/ubuntu/distr/TeamCity/bin/runAll.sh start > /dev/null
@poul-kg
poul-kg / buildagent
Last active Nov 11, 2015
TeamCity build agent startup - Ubuntu 14.04 on AWS
View buildagent
#!/bin/sh
# /etc/init.d/buildagent
# # This will start TeamCity build agent on system startup as ubuntu user
# To run it on every system startup, execute:
# sudo update-rc.d buildagent defaults
case "$1" in
start)
echo "Starting TeamCity build agent "
start-stop-daemon --start --chuid ubuntu:ubuntu --quiet --exec /home/ubuntu/BuildAgent/bin/agent.sh start > /dev/null
You can’t perform that action at this time.