Skip to content

Instantly share code, notes, and snippets.

View olistik's full-sized avatar

Maurizio De Magnis olistik

View GitHub Profile
<script type="text/javascript" src="swfobject.js"></script>
<object id="candy_video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
<param name="movie" value="myContent.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420">
<!--<![endif]-->
<!--[if !IE]>-->
</object>
<!--<![endif]-->
<script>
$(function() {
$('input').placeholder();
});
</script>
@olistik
olistik / gist:1082234
Created July 14, 2011 10:26
/no-js/index.html
We couldn’t find that file to show.
commit 238c29f0a7ee83aa4a361ad5452aaed375bfad39
Author: Maurizio De Magnis <[email protected]>
Date: Mon Jul 18 18:58:40 2011 +0200
news open
diff --git a/css/style.css b/css/style.css
index 07da609..5714673 100644
--- a/css/style.css
+++ b/css/style.css
puts "hello world"
@olistik
olistik / semaphore.js
Created August 4, 2011 22:29
simple Semaphore implementation
/* usage:
> Semaphore("task1").isOn()
false
> Semaphore("task1").on()
Semaphore.module
> Semaphore("task1").isOn()
true
> Semaphore("task1").off()
Semaphore.module
> Semaphore("task1").isOn()
if(p.state == "text" || p.state == "swarm"){
if(p.state == "swarm" && it){
//allow the interactive particles to swarm around mouse
}else if(p.state == "text" && d < stirDist && it){
//allow interactive text to swarm around mouse
}else{
dX = x - m.destX;
dY = y - m.destY;
}
}
#!/usr/bin/env ruby
# you could even use pbcopy:
# chmod +x akamai_urls.rb
# ./akamai_urls.rb | pbcopy
locales = %w(en fr es de ja hans hant it)
root_link = "http://www.prada.com/%s"
gallery_base_link = "http://www.prada.com/%s/real-fantasies-fw11/fantasy-lookbook"
gallery_link = "http://www.prada.com/%s/real-fantasies-fw11/fantasy-lookbook?index=%s"
#!/bin/bash
# requires:
# git
# gist
# pbcopy
E_BADARGS=65
if [ $# -ne 1 ]
@olistik
olistik / gist:1398377
Created November 27, 2011 23:00
GIT <3
# source: http://goo.gl/BaVkQ
$ git log --name-status
# To delete a remote branch
$ git push origin :<branch_name>