Skip to content

Instantly share code, notes, and snippets.

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

Laurent Pellegrino lpellegr

Enjoying life every second of the day
View GitHub Profile
@lpellegr
lpellegr / 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"
[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
<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);
}
});
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 '}'
@lpellegr
lpellegr / 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",
@lpellegr
lpellegr / 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);
}
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;
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,
@lpellegr
lpellegr / 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
webpackJsonp([3],{"+Jt5":function(t,e,i){"use strict";function s(){this.defaultAttrs({pendingFollowersTitleSelector:".ProfileHeading-pendingFollowersText"}),this.handlePendingFollowerChange=function(t,e){e.pendingRequestsHtml&&this.select("pendingFollowersTitleSelector").html(e.pendingRequestsHtml)},this.after("initialize",function(){this.on(document,"dataFollowerAcceptSuccess",this.handlePendingFollowerChange),this.on(document,"dataFollowerDeclineSuccess",this.handlePendingFollowerChange)})}var o=i("DBjh");e.a=Object(o.default)(s)},"/gHE":function(t,e,i){"use strict";function s(t,e,i,s,p){var g=m({},t,{endpoint:e,itemType:s,eventData:{scribeContext:{component:p||s}}});Object(o.a)(m({},g,{statsName:i})),Object(a.a)("#timeline",g);var v="home"===g.pageName||"me"===g.pageName||"profile"===g.pageName,b=v?[h.a]:[];u.a.mixin.apply(this,b).attachTo("#timeline",g);var S=[];v&&(S=S.concat(l.a),f.a.attachTo("#timeline",g)),r.a.attachTo(document),n.a.mixin.apply(this,S).attachTo("#timeline",g),d.a.attachTo("#timeline",