Skip to content

Instantly share code, notes, and snippets.

Rémy HUBSCHER Natim

Block or report user

Report or block Natim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Natim
Natim / Square.elm
Last active Jul 25, 2018
From bottom to top, floating animation showcase
View Square.elm
module Square exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Animation exposing (px, percent)
import Time exposing (second)
import Ease exposing (..)
View Types.elm
type alias Page =
{ name : String
, url : String
, created_at : Date
, title : String
, description : String
, url : String
}
View dynamic_methods.py
from functools import partial
RULES = {
'six_h': {'high': 390, 'low': 330},
'twelve_h': {'high': 750, 'low': 690},
'twentyfour_h': {'high': 1490, 'low': 1410},
'seven_d': {'high': 169, 'low': 168}
}
@Natim
Natim / get_anchors.py
Last active Mar 8, 2017
Get anchors from Woleet
View get_anchors.py
import aiohttp
import asyncio
import os
WOLEET_SERVER = 'https://api.woleet.io/v1'
WOLEET_HEADERS = {
'Authorization': 'Bearer {}'.format(os.getenv('WOLEET_BEARER_TOKEN')),
'Content-Type': 'application/json'
}
@Natim
Natim / README.md
Created May 25, 2016
A first kinto_bootstrap PoC
View README.md

To use it:

python kinto_bootstrap.py -s http://localhost:8888 -a token:my-token -v
$ python kinto_bootstrap.py --help
usage: kinto_bootstrap.py [-h] [-s SERVER] [-a AUTH] [-b BUCKET] [-v] [-q]
                          [-D]

Bootstrap bucket
@Natim
Natim / scrap_amo_throttle.py
Created Mar 9, 2016
Scrap AMO with Python3 and asyncio
View scrap_amo_throttle.py
# -*- coding: utf-8 -*-
# This is PY3 only code using asyncIO
import asyncio
import aiohttp
import base64
import json
from random import randint
from kinto_client import Client, Endpoints
from pyquery import PyQuery as pyquery
@Natim
Natim / scrap_amo.py
Created Mar 9, 2016
For each addons, scrap AMO to get the who and why information.
View scrap_amo.py
# -*- coding: utf-8 -*-
# This is PY3 only code using asyncIO
import asyncio
import aiohttp
from pyquery import PyQuery as pyquery
async def fetch_info(session, record):
if 'blockID' not in record:
print("{} doesn't have a blockID".format(record['id']))
@Natim
Natim / hello.rst
Created Dec 21, 2015
How to connect to Firefox Hello with Firefox Account
View hello.rst

First ask for Firefox Account OAuth params

http POST https://loop.services.mozilla.com/v0/fxa-oauth/params

HTTP/1.1 200 OK
Access-Control-Expose-Headers: Hawk-Session-Token
Connection: keep-alive
@Natim
Natim / get_random_token.py
Created Dec 15, 2015
Loadtesting with Firefox Account
View get_random_token.py
#!/usr/bin/env python
from __future__ import print_function
import base64
import hmac
import os
import sys
from six.moves.urllib.parse import urlparse
from fxa import core
from fxa import errors
View morse.py
lettre_morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
You can’t perform that action at this time.