Skip to content

Instantly share code, notes, and snippets.

@ardianzzz
ardianzzz / gist:1022330
Created June 13, 2011 05:00
Profile Microdata & Microformats
<div itemscope="" itemtype="http://data-vocabulary.org/Person" class="vcard">
<img itemprop="photo" class="photo" src="IMAGE SOURCE" alt="" />
<span itemprop="name" class="fn">YOUR NAME</span>
<span itemprop="nickname" class="nickname">NICKNAME</span>
<span itemprop="title" class="title">TITLE WORK</span>
<a href="#" itemprop="affiliation" class="org">WORKPLACE</a>
<a href="#" itemprop="url" class="url">URL</a>
<a href="mailto:EMAIL" itemprop="work" class="email">EMAIL</a>.
<span itemprop="address" itemscope="" itemtype="http://data-vocabulary.org/Address" class="adr">
<span itemprop="locality" class="locality">LOCAL</span>
@ardianzzz
ardianzzz / gist:1062110
Created July 3, 2011 09:36
SwissPress -- modified
/*
Theme Name: SwissPress
Description: Designed by <a href="http://www.firmanfirdaus.com">Firman Firdaus</a> for <a href="http://www.wpcharity.com">WPCharity</a>
Theme URI: http://wpcharity.com
Author: Moch. Zamroni
Author URI: http://wpcharity.com
Template: twentyten
Version: 1.0.0
Copyright: (c) 2010 WPCharity.
@ardianzzz
ardianzzz / Responsive Grid
Created December 3, 2011 12:12
Responsive 12 Column Grid
.grid-1 { width:60px; }
.grid-2 { width:140px; }
.grid-3 { width:220px; }
.grid-4 { width:300px; }
.grid-5 { width:380px; }
.grid-6 { width:460px; }
.grid-7 { width:540px; }
.grid-8 { width:620px; }
.grid-9 { width:700px; }
.grid-10 { width:780px; }
<script>
$(function () {
var msie6 = $.browser == 'msie' && $.browser.version < 7;
if (!msie6) {
var top = $('#hot-cat').offset().top - parseFloat($('#hot-cat').css('margin-top').replace(/auto/, 0));
$(window).scroll(function (event) {
// what the y position of the scroll is
var y = $(this).scrollTop();
@ardianzzz
ardianzzz / rakefile
Created May 5, 2012 11:25
Jekyll New Post Rakefile
desc "Given a title as an argument, create a new post file"
task :write, [:title, :category] do |t, args|
filename = "#{Time.now.strftime('%Y-%m-%d')}-#{args.title.gsub(/\s/, '_').downcase}.markdown"
path = File.join("_posts", filename)
if File.exist? path; raise RuntimeError.new("Won't clobber #{path}"); end
File.open(path, 'w') do |file|
file.write <<-EOS
---
layout: post
category: #{args.category}
@ardianzzz
ardianzzz / gist:2688088
Created May 13, 2012 12:06
earthquake error
_ _ _
___ __ _ _ __| |_| |__ __ _ _ _ __ _| | _____
/ _ \/ _` | '__| __| '_ \ / _` | | | |/ _` | |/ / _ \
| __/ (_| | | | |_| | | | (_| | |_| | (_| | < __/
\___|\__,_|_| \__|_| |_|\__, |\__,_|\__,_|_|\_\___|
|_| v0.7.1
1) open: https://api.twitter.com/oauth/authorize?oauth_token=Vame4puB60fme5lfXPe0qpvPsFk4Vtmx4WX75kdABU
WARNING: You made a call to a deprecated Launchy API. This call should be changed to 'Launchy.open( uri )'
WARNING: I think I was able to find the location that needs to be fixed. Please go look at:
@ardianzzz
ardianzzz / gist:3216874
Created July 31, 2012 12:53
Fluid Grid Framework
@import "compass";
@import "compass/reset";
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-family:sans-serif;
}
@ardianzzz
ardianzzz / gist:3691990
Created September 10, 2012 16:36
Input file
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
// Loop through the FileList and render image files as thumbnails.
for (var i = 0, f; f = files[i]; i++) {
// Only process image files.
if (!f.type.match('image.*')) {
@ardianzzz
ardianzzz / 1kb editor
Last active October 28, 2016 09:12
1Kb HTML5 WYSWYG Editor
<html>
<head>
<title>1Kb HTML5 WYSWYG Editor</title>
<style>
.control {
margin:0 0 8px;
}
#editable {
padding:10px;
border:solid 1px #ccc;
function handleFileSelect(evt) {
var files = evt.target.files;
for (var i = 0, f; f = files[i]; i++) {
if (!f.type.match('image.*')) {
$('#dialogModal').modal('show');
return false;
}
var reader = new FileReader();
reader.onload = (function(theFile) {