Skip to content

Instantly share code, notes, and snippets.

View poul-kg's full-sized avatar

Pavel Kostenko poul-kg

View GitHub Profile
@poul-kg
poul-kg / buildagent
Last active November 11, 2015 09:33
TeamCity build agent startup - Ubuntu 14.04 on AWS
#!/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
@poul-kg
poul-kg / teamcity
Created November 11, 2015 09:33
TeamCity startup script for Ubuntu 14.04 on AWS
#!/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 / semantic-ui-twig-template.html
Created December 1, 2016 12:01
Semantic UI Twig Template
<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 / watson-page-response.twig
Created December 1, 2016 12:03
Watson Page Response in 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"
@poul-kg
poul-kg / life-ai-app-privacy-policy
Created May 16, 2017 11:55
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 / valet.conf
Last active September 18, 2024 17:32
CORS Rules for Laravel Valet Nginx
# 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 / bot-luis-timezone-offset.js
Created November 14, 2018 09:30
MS BotFramework LUIS timezoneOffset
/**
* 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
*