Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Bassetto tbassetto

View GitHub Profile
View keybase.md

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 Oct 30, 2015
Angular2 + Material Design Lite
View app.ts
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 Oct 29, 2012
Example of Sublime Text 2 project configuration
View yesthisisdog.sublime-project
{
"folders":
[
{
"path": "/Users/plop/Code/mouette/yesthisisdog",
"folder_exclude_patterns": ["css", "node_modules", "j-framework", ".sass-cache"],
"file_exclude_patterns": ["*.optimize.*"]
}
]
}
View DetectSyntax.sublime-settings
{
// 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:
View dabblet.css
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;
View dabblet.css
/**
* TV screen
*/
html { background: white; }
.tv {
position: relative;
width: 200px;
height: 150px;
@tbassetto
tbassetto / dabblet.css
Created Feb 6, 2012 — forked from cahnory/dabblet.css
Centrage horizontal et vertical — universel
View dabblet.css
/**
* Centrage horizontal et vertical — universel
*/
html, body {
height: 100%;
margin: 0;
width: 100%;
}
.layout {
@tbassetto
tbassetto / fillLocalStorage.js
Created Jan 20, 2012
Fill localStorage until the last byte possible
View fillLocalStorage.js
// 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) {
View screening.js
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
View main.js
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');