Skip to content

Instantly share code, notes, and snippets.

View phildionne's full-sized avatar

Philippe Dionne phildionne

View GitHub Profile
jest.config.js:14 - default
newrelic.cjs:7 - config
webpack.config.js:12 - default
__mocks__/styleMock.js:2 - default
web/tests/global-setup.ts:3 - default
web/tests/mock-module.js:2 - default
web/tests/mock-svg.js:2 - default
web/tests/test-utils.tsx:20 - getVisibleText (used in module)
web/tests/test-utils.tsx:132 - getSelectItem
web/tests/test-utils.tsx:147 - queryByTestId (used in module)
---
kind: pipeline
name: default
steps:
- name: test
image: ruby:2.6.3-alpine
commands:
- echo $FOO
- echo $BAR
@phildionne
phildionne / a.html
Created October 2, 2018 22:01
autotune debug
<h1>A</h1>
<a href="/">Home</a>
# config/application.rb
module MyApp
class Application < Rails::Application
# Handle exceptions with a custom controller
config.exceptions_app = lambda do |env|
ErrorsController.action(:show).call(env)
end
end
end
### Keybase proof
I hereby claim:
* I am phildionne on github.
* I am pdionne (https://keybase.io/pdionne) on keybase.
* I have a public key ASALJIZd1Snk6_xqNGbjBFC-_Kmin4X8vbfm_A25PmSf5Qo
To claim this, I am signing this object:
@phildionne
phildionne / bot.rb
Last active May 20, 2016 23:30
Dialog Analytics example integration in a Facebook Messenger and Ruby chatbot.
require_relative './dialog'
require 'facebook/messenger' # https://github.com/hyperoslo/facebook-messenger
Facebook::Messenger.configure do |config|
config.access_token = ENV['FACEBOOK_ACCESS_TOKEN']
config.verify_token = ENV['FACEBOOK_SECRET_TOKEN']
end
include Facebook::Messenger
@phildionne
phildionne / bot.rb
Last active May 20, 2016 20:25
Dialog Analytics example integration in a Telegram and Ruby chatbot.
require_relative './dialog'
require 'telegram/bot' # https://github.com/atipugin/telegram-bot-ruby
Telegram::Bot::Client.run(ENV.fetch('TELEGRAM_TOKEN')) do |bot|
bot.listen do |message|
case message.text
when '/test'
Dialog.track(message)
text = "Welcome to test"
@client.query_in_batches("SELECT * FROM Invoice", per_page: 1000) do |records|
records.entries.each do |record|
# Record has an active class
if record.class_ref.present? && !record.class_ref.name.match(/supprimé/)
reference = record.class_ref
# Find project & organisation
project = Project.find_by!(quickbooks_class_id: reference.value)
organisation = project.organisation
@phildionne
phildionne / Gemfile
Last active December 24, 2015 03:29 — forked from stephencelis/minidress.rb
Minidress
source 'https://rubygems.org'
gem 'bundler', '~> 1.3'
gemspec
@phildionne
phildionne / cachemire.rb
Last active December 24, 2015 02:09 — forked from plehoux/cachemire.rb
module Cachemire
extend ActiveSupport::Concern
included do
class_attribute :cache_store
end
module ClassMethods
private