Skip to content

Instantly share code, notes, and snippets.

View valenso's full-sized avatar
👾
I may be slow to respond.

Valentin valenso

👾
I may be slow to respond.
View GitHub Profile
@valenso
valenso / deploy.yml
Last active January 24, 2021 19:43
How to automate Firebase app deployment with GitHub Actions
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 June 8, 2020 13:08
DialogFlow Weather Fulfillment
// 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 March 28, 2020 16:57
Bots Factory with Docker
FROM ruby:2.6
WORKDIR /.
COPY . .
RUN bundle install
CMD ["ruby", "./bot.rb"]
@valenso
valenso / Gemfile
Last active March 27, 2020 09:45
Bots Factory, #1
source 'https://rubygems.org'
gem 'telegram-bot-ruby'
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
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())
{
"success": true,
"code": 500,
"error": {
"core": "Error fetch data from core"
}
}
{
"version": "2.8",
"settings": {
},
"nativeads": {
"settings": {
<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>
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)