Skip to content

Instantly share code, notes, and snippets.

View tbassetto's full-sized avatar

Thomas Bassetto tbassetto

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tbassetto on github.
  • I am tbassetto (https://keybase.io/tbassetto) on keybase.
  • I have a public key whose fingerprint is DA53 68D3 07BB 2835 EFD7 63BF 13EE 96BF 7D5F 095F

To claim this, I am signing this object:

@tbassetto
tbassetto / app.ts
Created October 30, 2015 08:39
Angular2 + Material Design Lite
import {bootstrap, Component, Inject, ElementRef, onInit} from 'angular2/angular2';
@Component({
selector: 'my-app',
template: `
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<!-- Title -->
<span class="mdl-layout-title">Title</span>
@tbassetto
tbassetto / yesthisisdog.sublime-project
Created October 29, 2012 10:22
Example of Sublime Text 2 project configuration
{
"folders":
[
{
"path": "/Users/plop/Code/mouette/yesthisisdog",
"folder_exclude_patterns": ["css", "node_modules", "j-framework", ".sass-cache"],
"file_exclude_patterns": ["*.optimize.*"]
}
]
}
@tbassetto
tbassetto / DetectSyntax.sublime-settings
Created October 29, 2012 09:59
DetextSyntac configuration
{
// If you want exceptions reraised so you can see them in the console, change this to true.
"reraise_exceptions": false,
// If you want to have a syntax applied when new files are created, set new_file_syntax to the name of the syntax to use.
// The format is exactly the same as "name" in the rules below. For example, if you want to have a new file use
// JavaScript syntax, set new_file_syntax to 'JavaScript'.
"new_file_syntax": false,
// Put your custom syntax rules here:
@tbassetto
tbassetto / dabblet.css
Created July 12, 2012 14:40 — forked from Victa/dabblet.css
Untitled
body{text-align:center;background:#eff3f6;margin:2em;}
i{display:inline-block;position:relative;margin:0 .1em;}
i::before{content:"";position:absolute;display:block;}
.folder{
width:14px;
height:10px;
background-image:linear-gradient(#a7c3d9, #709fc2);
box-shadow:inset 0 1px 0 #c6d9e7, 0 1px 0 #bbbfc3;
border-width:1px;
@tbassetto
tbassetto / dabblet.css
Created February 15, 2012 13:31 — forked from LeaVerou/dabblet.css
TV screen
/**
* TV screen
*/
html { background: white; }
.tv {
position: relative;
width: 200px;
height: 150px;
@tbassetto
tbassetto / dabblet.css
Created February 6, 2012 13:46 — forked from cahnory/dabblet.css
Centrage horizontal et vertical — universel
/**
* Centrage horizontal et vertical — universel
*/
html, body {
height: 100%;
margin: 0;
width: 100%;
}
.layout {
@tbassetto
tbassetto / fillLocalStorage.js
Created January 20, 2012 15:01
Fill localStorage until the last byte possible
// Only count bytes inserted as values, not counting keys...
(function() {
localStorage.clear();
var nbBytes = 5000, // about 0.5Mb
oneByte = 'x',
i = 0,
totalBytesInserted = 0;
function repeat(string, length) {
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
var pageMod = require("page-mod");
pageMod.add(new pageMod.PageMod({
include: "*",
contentScriptWhen: 'start',
contentScript: 'new ' + function WorkerScope() {
console.log("exec");
var htmlMutation = function(e) {
var node = document.querySelector('object, embed');