Skip to content

Instantly share code, notes, and snippets.

View thom4parisot's full-sized avatar

Thomas Parisot thom4parisot

View GitHub Profile
@thom4parisot
thom4parisot / convert-helpers.js
Last active August 29, 2015 13:58
XML Stream Update
'use strict';
var STYLE_ATTRIBUTE = 'text-style-name';
var styleMatches = function (item, styleName) {
if (!item || item.attributes === undefined || item.attributes[STYLE_ATTRIBUTE] === undefined) {
return false;
}
return item.attributes[STYLE_ATTRIBUTE].match(styleName);
@thom4parisot
thom4parisot / data.js
Last active August 29, 2015 14:04
requirebin sketch
srcToCanvasPalette('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAEyATIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD6kQqeeRUo2kcGlS3GM9zUgt0CdDn1ryrIzuxYl2jtU6S4BGOKZFAvdsexNWUs1c4WQZ9xSsgKbQhicj6VGIypHBrU+wyoMlQQO4pfKJGCKaEVYk3dsVYFqW6CpYoPmxjAFXoo/wDZ5FJuwGetiQvGD
@thom4parisot
thom4parisot / README.md
Last active August 29, 2015 14:06
Node.js usual project directory structure.
├── bin
├── config
├── data
├── dist
├── doc
├── lib
│   └── models
├── node_modules
├── src
@thom4parisot
thom4parisot / index.adoc
Last active August 29, 2015 14:07
Asciidoc source code include rendering test
[code,javascript]
----
include::source.js[]
----

is rendered as…

@thom4parisot
thom4parisot / run.sh
Created October 4, 2014 20:11
Handlebars template evaluation one liner
handlebars template.hbs -c 'handlebars' | node -e 'process.stdin.on("data", function(d){ eval(String(d)); console.log(Handlebars.templates["template.hbs"]({ items: ["Node.js", "CSS maintenables", "Open Sky"] })) })'
@thom4parisot
thom4parisot / card.html
Last active August 29, 2015 14:07
bada55.io card
<article class="flip" itemscope="" itemtype="http://schema.org/Thing" data-bada55="{ color: '#bada55', name: 'badass', likeUrl: 'http://bada55.io/like/137' }">
<div class="flip-card flipped">
<header class="card-face face-front flip-trigger" style="background-color:#bada55">
<div class="inner">
<h1 class="card-title" itemprop="name">#bada55</h1>
<h2 class="card-subtitle" itemprop="alternateName">badass</h2>
</div>
</header>
<div class="card-face face-back" style="background-color:#bada55">

Keybase proof

I hereby claim:

  • I am oncletom on github.
  • I am oncletom (https://keybase.io/oncletom) on keybase.
  • I have a public key whose fingerprint is 4663 7E26 7871 DF7F 2557 88EE 893C 87DF B333 5E7E

To claim this, I am signing this object:

@thom4parisot
thom4parisot / .eslintrc
Last active August 29, 2015 14:10
Asciidoctor dot-include
{
"env": {
"node": true
},
"rules": {
"global-strict": 1,
"quotes": [2, "single"]
}
}
FROM ubuntu:precise
# make sure system is up-to-date
RUN apt-get update -qq && apt-get install apt-utils -y && apt-get upgrade -y
# install BLAS libraries (needed by scipy)
RUN apt-get install gfortran libopenblas-dev liblapack-dev -y
# install scipy via apt, save build time
RUN apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose -y
@thom4parisot
thom4parisot / Dockerfile
Last active August 29, 2015 14:12
Docker instance sharing with boot2docker
FROM busybox
CMD ["docker", "--tlsverify", "ps"]