Skip to content

Instantly share code, notes, and snippets.

View philippeantoine's full-sized avatar

philippeantoine

  • Paris
View GitHub Profile
@philippeantoine
philippeantoine / index.js
Created May 1, 2018 20:16
2018-05-01-ArduinoButton
var argv = require('optimist')
.usage('Arduino deploy button')
.demand('d')
.describe('d', 'project directory')
.argv
var five = require("johnny-five")
var spawn = require('child_process').spawn
var board = new five.Board()
var dir = argv.d
security find-generic-password -ga "yourwifiSSID" | grep "password:"
<!doctype html><head><meta charset="UTF-8">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
</head><body>
<form name="f">
<!-- when I click on the a link, I get the file input popup -->
<p><a id="ok" class="btn span1"><i class="icon-plus-sign"></i> PASS</a>
<input type="file" name="fileok">
@philippeantoine
philippeantoine / tetris.html
Created April 20, 2012 13:16
Tetris #devoxxfr
<!doctype html><html>
<head><meta charset="UTF-8"><title>Tetris</title></head>
<body>
<pre id='game'></pre>
<script>
var tetris = {
empty:0,board:0,block:0,position:0,offset:0,
init: function(){
this.empty = 1<<30;
this.board = this.empty;
@philippeantoine
philippeantoine / pacman.html
Created March 22, 2012 19:31
2012-03-23 codingdojo pacman
<!doctype html><html><head><meta charset=UTF-8><title>pcmn</title>
<script src="http://code.jquery.com/qunit/git/qunit.js"></script></head><body>
<pre id='game'></pre>
<script>
String.prototype.replaceAt=function(index, char) {
@philippeantoine
philippeantoine / Tetris.html
Created February 15, 2012 21:09
2012-02-15 codingdojo tetris
<!doctype html><html><head><meta charset="UTF-8"><title>Tetris</title></head>
<body>
<pre id='game'></pre>
<script>
var tetris = {
empty:0,board:0,block:0,position:0,offset:0,
binary: function(i){
return (i).toString(2);
},
init: function(){
@philippeantoine
philippeantoine / Tetris.html
Last active September 30, 2015 15:58
Tetris
<!doctype html><html><head><meta charset="UTF-8"><title>Tetris</title></head>
<body><pre></pre><script>
var ttrs = { board: 0, block: 3, position: 32, offset: 0, layer: 0, speed: 1000, size: 32,
play: function(){
this.position += this.offset;
if ( this.bottom() || this.bang() ) {
this.position -= this.offset;
this.board = this.merge();
this.board = this.clear();
this.block = this.random();
@philippeantoine
philippeantoine / prefixes.html
Created February 13, 2012 11:15
prefixes.js
<!doctype html>
<html><meta charset="UTF-8"><head><title>prefixes</title></head>
<body>
<p>prefixes</p>
<style>
p{
-beta-transform: scaleY(2);
-alpha-text-stroke: 1px grey;
font: 25px sans-serif;
}
<!doctype html><html>
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<title>HTML Template</title></head>
<body><h1>HTML template</h1>
<p>Text.</p>
<table>
<thead>