Skip to content

Instantly share code, notes, and snippets.

View laurentpellegrino's full-sized avatar
Enjoying life every second of the day

Laurent Pellegrino laurentpellegrino

Enjoying life every second of the day
View GitHub Profile
@laurentpellegrino
laurentpellegrino / Dockerfile
Created September 14, 2018 22:02 — forked from tnolet/Dockerfile
A Dockerfile for running Puppeteer. Used for https://trypuppeteer.com. Scraped together from various sources. Works well with Puppeteer 1.0.0
FROM ubuntu:16.04
# Create a user so our program doesn't run as root.
RUN mkdir -p /home/chrome/
RUN groupadd -r chrome &&\
useradd -r -g chrome -d /home/chrome -s /sbin/nologin -G audio,video chrome
ENV HOME=/home/chrome
const server = new ApolloServer({
context: async ({req, res}) => {
const userQuotas = await checkAuthorization(req);
setRateLimitHeaders(res, userQuotas);
res.set('Cache-Control', 'public, max-age=150, s-maxage=300');
return {
firestore: db,
const template = document.createElement('template');
template.setAttribute('style', 'display: none;');
template.innerHTML = `<dom-module id="material-text-field" theme-for="vaadin-text-field">
<template>
<style>
:host {
background-color: #e1e9fd;
border-radius: 4px;
padding: 6px 12px;
width: 60px;
@laurentpellegrino
laurentpellegrino / gist:64005a58f29865099dcc47621cca2fba
Created January 18, 2018 08:32
noticeable-words-carousel.html
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<dom-module id="noticeable-words-carousel">
<template>
<style>
:host {
box-sizing: border-box;
@apply(--typed-text-options);
}
@laurentpellegrino
laurentpellegrino / polymer.json
Created January 17, 2018 20:27
Noticeable.io polymer json
{
"entrypoint": "index.html",
"shell": "src/noticeable-app.html",
"fragments": [
"src/noticeable-account.html",
"src/noticeable-account-billing.html",
"src/noticeable-account-billing-plans.html",
"src/noticeable-account-billing-usage.html",
"src/noticeable-account-profile.html",
"src/noticeable-account-zapier.html",
Running Steam on fedora 26 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Installing breakpad exception handler for appid(steam)/version(1501201798)
Installing breakpad exception handler for appid(steam)/version(1501201798)
Installing breakpad exception handler for appid(steam)/version(1501201798)
(steam:19583): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
/usr/share/themes/Adwaita/gtk-2.0/main.rc:733: error: unexpected identifier 'direction', expected character '}'
<polymer-element name="user-gravatar" attributes="email">
<template>
<img src="https://secure.gravatar.com/avatar/{{gid}}" />
</template>
<script>
Polymer('user-gravatar', {
ready: function() {
this.gid = md5(this.email);
}
});
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
#Name = BlueZ
# Default device class. Only the major and minor device class bits are
# considered. Defaults to '0x000000'.
#Class = 0x000100
@laurentpellegrino
laurentpellegrino / emergency-numbers.py
Last active May 9, 2017 16:04
Extract emergency numbers from the libphonenumber resource and create an immutable Java map based on country codes
#!/usr/bin/python3
from lxml import etree
import os
import tempfile
import urllib
JAVA_VARIABLE_NAME="emergencyNumberPerCountryCode"
PHONE_NUMBER_METADATA_URL="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/resources/ShortNumberMetadata.xml"
@laurentpellegrino
laurentpellegrino / ow2-proactive-jenkins-tests-failing-investigation
Created August 19, 2016 06:38
Summary of Jenkins tests that are failing for Scheduling project
* Build #804 (Aug 16, 2016 12:24:04 PM)
Windows
Test Result (3 failures / ±0)
functionaltests.RestSchedulerJobTaskTest.testJobResultValue
functionaltests.RestSchedulerJobTaskTest.urlMatrixParams_shouldReplace_jobVariabls
functionaltests.RestSchedulerJobTaskTest.testJobResult