Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
I may be slow to respond.

Valentin valenso

👾
I may be slow to respond.
View GitHub Profile
@valenso
valenso / deploy.yml
Last active Jan 24, 2021
How to automate Firebase app deployment with GitHub Actions
View deploy.yml
name: Deploy to Google
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches: [ master ]
jobs:
build:
@valenso
valenso / index.js
Created Jun 8, 2020
DialogFlow Weather Fulfillment
View index.js
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
var rp = require('request-promise');
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements
@valenso
valenso / Dockerfile
Last active Mar 28, 2020
Bots Factory with Docker
View Dockerfile
FROM ruby:2.6
WORKDIR /.
COPY . .
RUN bundle install
CMD ["ruby", "./bot.rb"]
@valenso
valenso / Gemfile
Last active Mar 27, 2020
Bots Factory, #1
View Gemfile
source 'https://rubygems.org'
gem 'telegram-bot-ruby'
View gist:6a480ef4f9ab6a43ab87f9dcac17a078
echo "version: '3'
services:
chrome:
image: selenium/node-chrome:3.141.59-selenium
volumes:
- /dev/shm:/dev/shm
depends_on:
- hub
environment:
HUB_HOST: hub
View Unit test example
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
View gist:e51b2addefdf6366a54ef0b67909bbf9
{
"success": true,
"code": 500,
"error": {
"core": "Error fetch data from core"
}
}
View gist:06f1f65b44344f94ed71e44d8fbd0fc5
{
"version": "2.8",
"settings": {
},
"nativeads": {
"settings": {
View gist:2188dc947b69b08db944e3965ee2af15
<section class="header-notifications" role="bm-notifications">
<section class="header-notification expiration" role="bm-notification bm-notification-expiration">
<div class="header-notification__container">
<span class="icon bookmate-icon-close-white" data-dismiss="alert" data-notification="expiration" role="bm-notification-close">
</span>
</div>
</section>
</section>
View gist:f0d86319b34524196e62b05c45f9b0a5
application.min.js:4 Uncaught TypeError: $(...).tweet is not a function
at HTMLDocument.<anonymous> (http://datafolks.com/assets/js/application/application.min.js:4:482)
at c (http://datafolks.com/assets/js/jquery-1.10.2.min.js:4:26036)
at Object.fireWith [as resolveWith] (http://datafolks.com/assets/js/jquery-1.10.2.min.js:4:26840)
at Function.ready (http://datafolks.com/assets/js/jquery-1.10.2.min.js:4:3305)
at HTMLDocument.q (http://datafolks.com/assets/js/jquery-1.10.2.min.js:4:717)