Skip to content

Instantly share code, notes, and snippets.

View tonycaputome's full-sized avatar
🏠
Working from home

Antonio Caputo tonycaputome

🏠
Working from home
  • Frontend Engineer
  • Milan, Italy
View GitHub Profile
@tonycaputome
tonycaputome / codeigniter_htaccess
Last active October 2, 2015 21:48 — forked from muhittin/codeigniter_htaccess
Apache : Codeigniter htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1
</IfModule>
@tonycaputome
tonycaputome / gist:2328206
Created April 7, 2012 12:01 — forked from paulirish/gist:603681
html5 and friends - a bigass bulleted list of features

HTML5 and friends.

A bigass bulleted list of features.

I commonly need to get a big list of all the stuff people think of when they think new and shiny these days. This list is for that.

I take a very inclusionist approach to it. 1

javascript APIs

  • Web Storage (localStorage, sessionStorage)
  • Web SQL Database
@tonycaputome
tonycaputome / jquery.boilerplate.js
Created April 7, 2012 12:17
Javascript : jQuery plugin boilerplate
// remember to replace all occurences of:
// boilerplate
// with your plugin namespace
(function ($) {
var settings = {
'setting': 'value'
};
@tonycaputome
tonycaputome / dabblet.css
Created April 9, 2012 08:48 — forked from anonymous/dabblet.css
CSS : Map Pins
/* CSS map pins */
body {
text-align: center;
margin: 80px;
background: #eee;
}
.pin.a {
display: inline-block;
<!-- Load either Zepto or jQuery, as necessary, from a CDN with a local fallback -->
<script>
document.write('<script src="//cdnjs.cloudflare.com/ajax/libs/' +
('__proto__' in {} ?
'zepto/1.0/zepto.min' :
'jquery/1.10.2/jquery.min')
+ '.js"><\/script>')
</script>
<script>
window.$ || document.write('<script src="js/vendor/' +
@tonycaputome
tonycaputome / jsdoit.css
Created July 19, 2013 15:20
forked: 点と線
body {
padding: 0;
margin: 0;
overflow: hidden;
background-color: #000;
color: #fff;
font-size: 12px;
}
canvas {
padding: 0;
@tonycaputome
tonycaputome / jsdoit.css
Created July 19, 2013 15:22
forked: Vibrating particles
#desc{
font-size:80%;
font-family:tahoma;
color:#222;
width:250px;
float:left;
position:absolute;
margin:5px;
background-color:rgba(255, 255, 255, 0.5);
}
<?php
class Person {
private $alive = true;
protected $gender = '';
protected $genitalOrgan = ''; }
class Man extends Person {
public function __construct(){
$this->gender = 'male';
var Module = (function(){
//variabili e funzioni private
var foo;
var setFoo = function(val){ foo = val; };
var getFoo = function(){ return foo; };
var increment = function(){
if(!foo){
setFoo(0);
@tonycaputome
tonycaputome / circle-menu.css
Last active August 29, 2015 13:57
Position icons into circle (SO)
/**
* Position icons into circle (SO)
* http://stackoverflow.com/q/12813573/1397351
*/
.circle-container {
position: relative;
width: 24em;
height: 24em;
padding: 2.8em; /*= 2em * 1.4 (2em = half the width of an img, 1.4 = sqrt(2))*/
border: dashed 1px;