Skip to content

Instantly share code, notes, and snippets.

@atma
atma / count_files.sh
Created May 10, 2013 02:13
Count all the files in a directory and all it's subdirectories
for i in /*; do echo $i; find $i | wc -l; done
@atma
atma / sample-layout.html
Last active December 10, 2015 04:28
uploader sample call & layout
<div id="sample-uploader-container" class="well">
<span id="sample-uploader-upload" class="btn"><i class="icon-upload"></i> Select</span> or drop here
</div>
<div id="sample-uploader-fileslist"></div>
@atma
atma / embed-html5-media.html
Created December 16, 2012 17:38
HTML5 Embedded Media - Video & Audio
<video poster="images/preview.png" width="1280" height="720" controls="controls" preload="none">
<source src="media/video.mp4" type="video/mp4"></source>
<source src="media/video.webm" type="video/webm"></source>
<source src="media/video.ogg" type="video/ogg"></source>
</video>
<audio controls="controls" preload="none">
<source src="music.ogg" type="audio/ogg">
<source src="music.mp3" type="audio/mpeg">
</audio>
@atma
atma / meta-responsive.html
Created December 16, 2012 17:37
HTML Meta Tags for Responsive Layouts
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
@atma
atma / font-face.css
Created December 16, 2012 17:36
Custom @font-face typography syntax
@font-face {
font-family: 'MyFont';
src: url('myfont.eot');
src: url('myfont.eot?#iefix') format('embedded-opentype'),
url('myfont.woff') format('woff'),
url('myfont.ttf') format('truetype'),
url('myfont.svg#webfont') format('svg');
}
h1 {
@atma
atma / gradient.css
Created December 16, 2012 17:35
Full CSS3 Gradients including IE filters and old webkit
.el {
background-color: #000;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bbb', endColorstr='#000');
background-image: -webkit-gradient(linear, left top, left bottom, from(#bbb), to(#000));
background-image: -webkit-linear-gradient(top, #bbb, #000);
background-image: -moz-linear-gradient(top, #bbb, #000);
background-image: -ms-linear-gradient(top, #bbb, #000);
background-image: -o-linear-gradient(top, #bbb, #000);
background-image: linear-gradient(top, #bbb, #000);
}
@atma
atma / basic-tpl.html
Created December 16, 2012 17:34
Basic HTML Page Template
<!doctype html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Default Page Title</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<!--[if lt IE 9]>
@atma
atma / jquery.plugin.js
Created December 2, 2012 18:21
jQuery plugin template
/**
* jquery.plugin.js v1.0.0
* http://github.com/someone/someplugin
*/
;( function( $, window, undefined ) {
'use strict';
var pluginName = 'pluginName',
Plugin = function( options, element ) {
this.$el = $( element );
@reboot ~/node-app-starter.sh >> cron.log 2>&1
@atma
atma / gist:3030909
Created July 2, 2012 03:45
jQuery callback on image load
$("img").one('load', function() {
// do stuff
}).each(function() {
if(this.complete) $(this).load();
});