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
FactoryGirl.define do
# Points according to Geojson specifications (X, Y) or (Longitude, Latitude)
sequence :point do
[
[38.15704300068319, 82.64793458394706],
[65.25863617658615, -24.040317703038454],
[-144.94273960590363, 20.84642690140754],
[137.46707799844444, 80.3652603412047],
[-131.11246040090919, 3.13029068056494],
[-37.99821515567601, 70.2160071535036],
@phildionne
phildionne / apartment.rb
Last active August 29, 2015 14:16
Rails + Apartment + PostGIS + activerecord-postgis-adapter
Apartment.configure do |config|
config.persistent_schemas = %w{ shared_extensions }
end