Skip to content

Instantly share code, notes, and snippets.

@sebastienb
sebastienb / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sebastienb
sebastienb / free_email_provider_domains.txt
Last active August 25, 2015 20:38 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com
@sebastienb
sebastienb / keymap.c
Last active April 26, 2020 04:04
Dexter 10 Key layout
/* Copyright 2020 Sebastien Barrau
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
module QrCodeHelper
def qr_code(string, options={})
base_size = options.fetch(:width, 200)
@qr_logo = options.fetch(:logo, "qr_code_logo.png")
@qr_logo_size = options.fetch(:logo_size, 48)
level = options.fetch(:level, :l)
@qr_data = RQRCode::QRCode.new(string, level: level).to_s.split("\n").collect(&:chars)
@qr_size = @qr_data.size